Пример #1
0
        public void ConnectToOperator(MessageTransfer.EndPoint serverEndPoint)
        {
            messageClientToServer.Connect(serverEndPoint.ToIPEndPoint());
            var p2pRequest = new P2PRequest
            {
                UserEmail = this.Email,
                UserID    = this.ID,
                UserName  = this.Name
            };

            messageClientToServer.SendMessage(p2pRequest);
        }
Пример #2
0
        public void ConnectToUser(MessageTransfer.EndPoint serverEndPoint)
        {
            messageServer = new MessageServer();
            messageServer.MessageReceived += MessageServer_MessageReceived;
            messageServer.Start();

            messageClient.Connect(serverEndPoint.ToIPEndPoint());

            ReadyRequest readyRequest = new ReadyRequest
            {
                EndPoint   = messageServer.ListeningEndPoint,
                OperatorID = ID
            };

            messageClient.SendMessage(readyRequest);
        }