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