예제 #1
0
        private void MessageClientToServer_MessageReceived(Message message, IPEndPoint endPoint)
        {
            if (message is P2PResponse)
            {
                messageClientToServer.CloseConnection();
                var response         = message as P2PResponse;
                var operatorEndPoint = response.ListeningEndPoint;
                messageClientToOperator.Connect(operatorEndPoint.ToIPEndPoint());

                Introduction introduction = new Introduction
                {
                    Name = Name
                };

                SendMessage(introduction);
            }
        }