Package net.tomp2p.rpc

Examples of net.tomp2p.rpc.RawDataReply


      UtilsDHT2.perfectRouting(peers);
      // do testing
      ByteBuf c = Unpooled.buffer();
      c.writeInt(77);
      Buffer b = new Buffer(c);
      peers[50].peer().rawDataReply(new RawDataReply() {
        @Override
        public Buffer reply(PeerAddress sender, Buffer requestBuffer, boolean complete) {
          System.err.println(requestBuffer.buffer().readInt());
          ByteBuf c = Unpooled.buffer();
          c.writeInt(88);
View Full Code Here


      UtilsDHT2.perfectRouting(peers);
      // do testing
      ByteBuf c = Unpooled.buffer();
      c.writeInt(77);
      Buffer b = new Buffer(c);
      peers[50].peer().rawDataReply(new RawDataReply() {
        @Override
        public Buffer reply(PeerAddress sender, Buffer requestBuffer, boolean complete) {
          System.err.println("got it");
          return requestBuffer;
        }
View Full Code Here

          @Override
          public Object reply(PeerAddress sender, Object request) throws Exception {
            return request;
          }
        });
        peers[i].peer().rawDataReply(new RawDataReply() {
          @Override
          public Buffer reply(PeerAddress sender, Buffer requestBuffer, boolean complete) throws Exception {
            return requestBuffer;
          }
        });
View Full Code Here

      PeerBuilder slaveMaker = new PeerBuilder(new Number160(rnd)).ports(4002);
      slave = slaveMaker.enableMaintenance(false).start();

      System.err.println("peers up and running");

      slave.rawDataReply(new RawDataReply() {
        @Override
        public Buffer reply(PeerAddress sender, Buffer requestBuffer, boolean last) throws Exception {
          final byte[] b1 = new byte[10000];
          int i = requestBuffer.buffer().getInt(0);
          ByteBuf buf = Unpooled.wrappedBuffer(b1);
View Full Code Here

TOP

Related Classes of net.tomp2p.rpc.RawDataReply

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.