CompactPeer() приватный Метод

private CompactPeer ( ) : byte[]
Результат byte[]
Пример #1
0
 public void CompactPeerTest()
 {
     string peerId = "12345abcde12345abcde";
     Uri uri = new Uri("tcp://192.168.0.5:12345");
     Peer p = new Peer(peerId, uri);
     byte[] compact = p.CompactPeer();
     Peer peer = Peer.Decode((BEncoding.BEncodedString)compact)[0];
     Assert.AreEqual(p.ConnectionUri, peer.ConnectionUri);
 }
Пример #2
0
 public void CompactPeerTest()
 {
     var peerId = "12345abcde12345abcde";
     var uri = new Uri("tcp://192.168.0.5:12345");
     var p = new Peer(peerId, uri);
     var compact = p.CompactPeer();
     var peer = Peer.Decode(compact)[0];
     Assert.Equal(p.ConnectionUri, peer.ConnectionUri);
 }
        public void CompactPeer()
        {
            string peerId = "12345abcde12345abcde";
            Uri    uri    = new Uri("ipv4://192.168.0.5:12345");
            Peer   p      = new Peer(peerId, uri);

            byte[] compact = p.CompactPeer();
            Peer   peer    = Peer.Decode(compact)[0];

            Assert.AreEqual(p.ConnectionUri, peer.ConnectionUri, "#1");
        }
Пример #4
0
        public void CompactPeerTest()
        {
            string peerId = "12345abcde12345abcde";
            Uri    uri    = new Uri("tcp://192.168.0.5:12345");
            Peer   p      = new Peer(peerId, uri);

            byte[] compact = p.CompactPeer();
            Peer   peer    = Peer.Decode((BEncoding.BEncodedString)compact)[0];

            Assert.AreEqual(p.ConnectionUri, peer.ConnectionUri);
        }