示例#1
0
 public void TestPeerSendMessage()
 {
     var peer = new Peer("*****@*****.**") {Password = "******"};
     peer.Login();
     peer.AddPeer("*****@*****.**");
     peer.SendMessage("message");
     peer.Logout();
 }
示例#2
0
        public void TestPeerSendReceiveMessage()
        {
            // Peer1.

            var peer1 = new Peer("*****@*****.**") {Password = "******"};
            peer1.Login();

            // Peer2.

            var peer2 = new Peer("*****@*****.**") {Password = "******"};
            peer2.Login();
            peer2.OnMessage += OnMessage;

            // Send message.

            peer1.AddPeer(peer2);
            peer1.SendMessage("message");

            // Logout.

            peer1.Logout();
            peer2.Logout();
        }
示例#3
0
 public void TestPeerLogin()
 {
     var peer = new Peer("*****@*****.**") {Password = "******"};
     peer.Login();
     peer.Logout();
 }