示例#1
0
        private void ConnectionCallback(IAsyncResult asyncResult)
        {
            try
            {
                Sock.EndConnect(asyncResult);
            }
            catch (Exception ex)
            {
                EventProvider.ExecuteErrorHandler(ex, SocketErrorLocation.EndStart);
                return;
            }

            TcpReceiveSocket receiveSocket = new TcpReceiveSocket(Sock, SocketSide.Client, EventProvider);

            receiveSocket.Start();

            EventProvider.ExecuteHandshakeHandler(((IPEndPoint)Sock.RemoteEndPoint).Address, null);
        }