Interface BitTorrentHandshakeHandler


  • public interface BitTorrentHandshakeHandler
    Handler which processes freshly connected peers to initiate the BitTorrent protocol.
    • Method Detail

      • onConnectionEstablished

        void onConnectionEstablished​(ISocket socket,
                                     byte[] torrentHash)
        Initiates the handshake by announcing which torrent we expect the remote end to download.
        Parameters:
        socket - The channel of the peer.
        torrentHash - The torrent for which we want this peer.
      • onConnectionReceived

        void onConnectionReceived​(ISocket socket)
        Responds to the received connection with the expected torrent if we have it.
        Parameters:
        socket - The channel of the peer.