Package net.tomp2p.message

Examples of net.tomp2p.message.Buffer.buffer()


   */
  public void handleBufferResponse(Message bufferResponse, FutureDone<Void> futureDone) {
    Buffer buffer = bufferResponse.buffer(0);
    if (buffer != null) {
      // decompose the large buffer into a buffer for each message
      List<Message> bufferedMessages = RelayUtils.decomposeCompositeBuffer(buffer.buffer(), bufferResponse.recipientSocket(),
          bufferResponse.senderSocket(), peer.connectionBean().channelServer().channelServerConfiguration().signatureFactory());
      LOG.debug("Received {} buffered messages", bufferedMessages.size());
      for (Message bufferedMessage : bufferedMessages) {
          processMessage(bufferedMessage);
      }
View Full Code Here


        msg.restoreContentReferences();
        msg.restoreBuffers();
        Buffer encoded = encodeMessage(msg, signatureFactory);

        buffer.writeInt(encoded.length());
        buffer.writeBytes(encoded.buffer());
      } catch (Exception e) {
        LOG.error("Cannot encode the buffered message. Skip it.", e);
      }
    }
    return buffer;
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.