4 pp "github.com/anacrolix/torrent/peer_protocol"
7 // These are called synchronously, and do not pass ownership. The Client and other locks may still
8 // be held. nil functions are not called.
9 type Callbacks struct {
10 CompletedHandshake func(_ *PeerConn, infoHash InfoHash)
11 ReadMessage func(*PeerConn, *pp.Message)
12 ReadExtendedHandshake func(*PeerConn, *pp.ExtendedHandshakeMessage)
13 PeerConnClosed func(*PeerConn)