Accept Example for Visual Basic
Private Sub LEADDICOMNet1_NetAccept (ByVal nStatus As Long)
Dim out$
Dim hClient As Long
Dim lClients As Long
'accepting the connection attempt
LEADDICOMNet1.Accept
'get the latest client
lClients = LEADDICOMNet1.GetClientCount(LEADDICOMNet1.hNet)
hClient = LEADDICOMNet1.GetClient(LEADDICOMNet1.hNet, lClients - 1)
'display some information about the connection:
out$ = "Peer: " & LEADDICOMNet1.GetPeerAddress (hClient)
List2.AddItem "Connection Accepted - " & out$
'reject the connection if we don't like the address
If (LEADDICOMNet1.GetPeerAddress (hClient) <> "207.238.49.199") Then
'close the connection
LEADDICOMNet1.Close hClient
End If
End Sub