Occurs when a connection is established with the remote host.
The OnConnect event occurs when a connection is made with a remote host as a result of a Connect method call. When the Connect method is called and the Blocking property is set to false, a socket is created but the connection is not actually established until after this event occurs. Between the time connection process is started and this event fires, no operation may be performed on the client other than calling the Disconnect method.
This event is only generated if the client is in non-blocking mode.