OnConnect Event  
 

The OnConnect event is generated when a client connection is established.

Syntax

Sub object_OnConnect ( [Index As Integer, ] ByVal Handle As Variant )

Remarks

The OnConnect event is generated when the client connection to the server has completed. The Handle argument specifies the handle to the client socket that was allocated for the session. This handle can be used with methods such as Read and Write to exchange information with the client.

The ClientAddress property can be used to determine the IP address of the client which established the connection. To terminate the client connection, use the Disconnect method.

See Also

ClientAddress Property, Disconnect Method, Read Method, ReadLine Method, Write Method, WriteLine Method, OnAccept Event, OnDisconnect Event