Class Message

java.lang.Object
org.klomp.snark.Message

class Message extends Object
Used to queue outgoing connections sendMessage() should be used to translate them to wire format.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final byte
     
    (package private) final int
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) byte[]
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) final int
     
    (package private) final int
     
    (package private) final int
     
    (package private) final int
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
    (package private) final byte
     
    (package private) static final byte
     
    (package private) static final byte
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Message(byte type)
    For types KEEP_ALIVE, CHOKE, UNCHOKE, INTERESTED, UNINTERESTED, HAVE_ALL, HAVE_NONE
    Message(byte[] data)
    For type BITFIELD
    Message(byte type, int piece)
    For types HAVE, PORT, SUGGEST, ALLOWED_FAST
    Message(byte type, int piece, int begin, int length)
    For types REQUEST, REJECT, CANCEL
    Message(int id, byte[] data)
    For type EXTENSION
    Message(int piece, int begin, int length, DataLoader loader)
    For type PIECE with deferred data
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    Utility method for sending a message through a DataStream.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait