Package com.torrent4j.net.peerwire.messages

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


    write(new HandshakeMessage(torrentHash, peerID));
  }

  @Override
  public void requestBlock(int pieceIndex, int start, int length) {
    write(new RequestMessage(pieceIndex, start, length));
  }
View Full Code Here


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

        peer.getTorrentPeer().getPieces()
            .load(((BitFieldMessage) msg).bitSet);
        peer.getStrategy().getPeerStrategy()
            .bitField(peer.getTorrent(), peer.getTorrentPeer());
      } else if (msg instanceof RequestMessage) {
        final RequestMessage message = (RequestMessage) msg;

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

            peer.getTorrentPeer().getState()
                .setUploadRequestedDate(null);
          }
        });
      } else if (msg instanceof RequestMessage) {
        final RequestMessage message = (RequestMessage) msg;

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

TOP

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

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.