Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureDirect.buffer()


          return ret;
        }
      });
      FutureDirect fd = master.peer().sendDirect(peers[50].peerAddress()).buffer(b).start();
      fd.await();
      if (fd.buffer() == null) {
        System.err.println("damm");
        Assert.fail();
      }
      int read = fd.buffer().buffer().readInt();
      Assert.assertEquals(88, read);
View Full Code Here


      fd.await();
      if (fd.buffer() == null) {
        System.err.println("damm");
        Assert.fail();
      }
      int read = fd.buffer().buffer().readInt();
      Assert.assertEquals(88, read);
      System.err.println("done");
      // for(FutureBootstrap fb:tmp)
      // fb.awaitUninterruptibly();
    } finally {
View Full Code Here

      });
      FutureDirect fd = master.peer().sendDirect(peers[50].peerAddress()).buffer(b).start();
      fd.await();
      System.err.println("done1");
      Assert.assertEquals(true, fd.isSuccess());
      Assert.assertNull(fd.buffer());
      // int read = fd.getBuffer().readInt();
      // Assert.assertEquals(88, read);
      System.err.println("done2");
    } finally {
      if (master != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.