Package com.torrent4j.net.peerwire.messages

Examples of com.torrent4j.net.peerwire.messages.BlockMessage


        break;
      case NotInterestedMessage.MESSAGE_ID:
        message = new NotInterestedMessage();
        break;
      case BlockMessage.MESSAGE_ID:
        message = new BlockMessage();
        break;
      case PortMessage.MESSAGE_ID:
        message = new PortMessage();
        break;
      case RequestMessage.MESSAGE_ID:
View Full Code Here


    write(new CancelMessage(pieceIndex, start, length));
  }

  @Override
  public void sendBlock(int pieceIndex, int start, ByteBuffer data) {
    write(new BlockMessage(pieceIndex, start, data));
  }
View Full Code Here

        peer.getStrategy()
            .getUploadStrategy()
            .blockRequestCancelled(peer.getTorrent(), block,
                peer.getTorrentPeer());
      } else if (msg instanceof BlockMessage) {
        final BlockMessage message = (BlockMessage) msg;

        final TorrentPiece piece = peer.getTorrent().getPiece(
            message.pieceIndex);
        final TorrentPieceBlock block = piece.getBlock(message.begin,
            message.data.remaining());
View Full Code Here

                .getPipeline().get("message-encoder"))
                .setHandshaked(true);
          }
        });
      } else if (msg instanceof BlockMessage) {
        final BlockMessage message = (BlockMessage) msg;

        final TorrentPiece piece = peer.getTorrent().getPiece(
            message.pieceIndex);
        final TorrentPieceBlock block = piece.getBlock(message.begin,
            message.data.remaining());
View Full Code Here

TOP

Related Classes of com.torrent4j.net.peerwire.messages.BlockMessage

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.