This method is called when a asynchronous socket connect operation completes.
connected will be true if the connection was successful.
See also ConnectAsync