FedP2P/callbacks.go

15 lines
465 B
Go
Raw Normal View History

2020-07-15 12:00:47 +08:00
package torrent
import (
pp "github.com/anacrolix/torrent/peer_protocol"
)
// These are called synchronously, and do not pass ownership. The Client and other locks may still
// be held. nil functions are not called.
type Callbacks struct {
2020-07-15 14:16:09 +08:00
CompletedHandshake func(_ *PeerConn, infoHash InfoHash)
ReadMessage func(*PeerConn, *pp.Message)
ReadExtendedHandshake func(*PeerConn, *pp.ExtendedHandshakeMessage)
2020-10-13 10:02:39 +08:00
PeerConnClosed func(*PeerConn)
2020-07-15 12:00:47 +08:00
}