4 "github.com/anacrolix/torrent/mse"
5 pp "github.com/anacrolix/torrent/peer_protocol"
8 // These are called synchronously, and do not pass ownership of arguments (do not expect to retain
9 // data after returning from the callback). The Client and other locks may still be held. nil
10 // functions are not called.
11 type Callbacks struct {
12 // Called after a peer connection completes the BitTorrent handshake. The Client lock is not
14 CompletedHandshake func(*PeerConn, InfoHash)
15 ReadMessage func(*PeerConn, *pp.Message)
16 ReadExtendedHandshake func(*PeerConn, *pp.ExtendedHandshakeMessage)
17 PeerConnClosed func(*PeerConn)
19 // Provides secret keys to be tried against incoming encrypted connections.
20 ReceiveEncryptedHandshakeSkeys mse.SecretKeyIter