/// <summary> /// Does the handshake and then calls the callback when complete. /// </summary> /// <param name="callback">The <see cref="HandshakeCompleteEventHandler"/> callback.</param> public void DoHandshake(HandshakeCompleteEventHandler callback) { this.callback = callback; socket.DidRead += new AsyncSocket.SocketDidRead(socket_DidRead); socket.Read(AsyncSocket.CRLFCRLFData, -1, HANDSHAKE_REQUEST_TAG); }