Package tahrir.io.net.TrPeerManager

Examples of tahrir.io.net.TrPeerManager.TrPeerInfo


    Assert.assertEquals(ot2.subObj.i, ot.subObj.i);
  }

  @Test
  public void trPeerInfoTest() throws Exception {
    final TrPeerInfo ot = new TrPeerInfo(new RemoteNodeAddress(new UdpNetworkLocation(InetAddress.getByName("127.0.0.1"), 1234), TrCrypto.createRsaKeyPair().a));
    final ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
    final DataOutputStream dos = new DataOutputStream(baos);
    TrSerializer.serializeTo(ot, dos);
    final DataInputStream dis = new DataInputStream(new ByteArrayInputStream(baos.toByteArray()));
    final TrPeerInfo ot2 = TrSerializer.deserializeFrom(TrPeerInfo.class, dis);
  }
View Full Code Here

TOP

Related Classes of tahrir.io.net.TrPeerManager.TrPeerInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.