NetClose Example for Visual Basic
Private Sub LEADDICOMNet1_NetClose(ByVal hNet As Long, ByVal nStatus As Long, ByVal hPeer As Long)
Dim out$
'a connection is being closed
'display some information about the connection:
out$ = "Host: " & LEADDICOMNet1.GetHostAddress (hNet)
out$ = out$ & " Port: " & CStr(LEADDICOMNet1.GetHostPort (hNet))
out$ = out$ & Chr(13)
out$ = out$ & "Peer: " & LEADDICOMNet1.GetPeerAddress (hNet)
out$ = out$ & " Port: " & CStr(LEADDICOMNet1.GetPeerPort (hNet))
MsgBox out$, , "Connection Closed"
End Sub