OnDisconnect Event  
 

The OnDisconnect event is generated when a connection is terminated.

Syntax

Sub object_OnDisconnect ( [Index As Integer] )

Remarks

The OnDisconnect event is generated when the connection is terminated by the server. This event is only triggered when the Blocking property is set to False.

When the OnDisconnect event fires, it is possible that there may still be buffered data available to read from the server. Before disconnecting from the server, the application should attempt to read any remaining data until the Read method returns a value of zero, or returns an error indicating that the operation would block.

See Also

Blocking Property, IsConnected Property, IsReadable Property, Connect Method, Disconnect Method, Read Method, OnConnect Event