public void TestPeerSendMessage() { var peer = new Peer("*****@*****.**") {Password = "******"}; peer.Login(); peer.AddPeer("*****@*****.**"); peer.SendMessage("message"); peer.Logout(); }
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(); }
public void TestPeerLogin() { var peer = new Peer("*****@*****.**") {Password = "******"}; peer.Login(); peer.Logout(); }