Interface PeerEvent


  • public interface PeerEvent
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int ET_ADD_AVAILABILITY
      The peer asserts that their availability should be added to the torrent-global availability pool.
      static int ET_BAD_CHUNK
      The peer has sent us a bad piece data chunk.
      static int ET_REMOVE_AVAILABILITY
      The peer asserts that their availability must now be taken from the torrent-global availability pool The peer must send this only after having sent a corresponding addAvailability message, and must not send it in a state prior to CLOSING state.
      static int ET_STATE_CHANGED
      peer state has changed data - Integer holding one of the state values defined in Peer
    • Field Detail

      • ET_STATE_CHANGED

        static final int ET_STATE_CHANGED
        peer state has changed data - Integer holding one of the state values defined in Peer
        See Also:
        Constant Field Values
      • ET_BAD_CHUNK

        static final int ET_BAD_CHUNK
        The peer has sent us a bad piece data chunk. data - Integer[2] piece_num piece that failed hash check total_bad_chunks total number of bad chunks sent by this peer so far
        See Also:
        Constant Field Values
      • ET_ADD_AVAILABILITY

        static final int ET_ADD_AVAILABILITY
        The peer asserts that their availability should be added to the torrent-global availability pool. The peer must send this when, and only when, their availability is known (such as after receiving a bitfield message) but not after going to CLOSING state. After having sent this message, the peer must remember they've done so and later send a corresponding removeAvailability message at an appropriate time. data - peerHavePieces boolean[] of pieces availabile
        See Also:
        Constant Field Values
      • ET_REMOVE_AVAILABILITY

        static final int ET_REMOVE_AVAILABILITY
        The peer asserts that their availability must now be taken from the torrent-global availability pool The peer must send this only after having sent a corresponding addAvailability message, and must not send it in a state prior to CLOSING state. The BitFlags must be complete, with all pieces from any Bitfield message as well as those from any Have messages. data - peerHavePieces boolean[] of pieces no longer available
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        int getType()
      • getData

        java.lang.Object getData()