Interface BitTorrentHandshakeHandler
-
public interface BitTorrentHandshakeHandlerHandler which processes freshly connected peers to initiate the BitTorrent protocol.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonConnectionEstablished(ISocket socket, byte[] torrentHash)Initiates the handshake by announcing which torrent we expect the remote end to download.voidonConnectionReceived(ISocket socket)Responds to the received connection with the expected torrent if we have it.
-
-
-
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.
-
-