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); }
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); }