// BitTorrent protocol connections. Some methods are underlined so as to avoid collisions with
// legacy PeerConn methods.
type peerImpl interface {
- onNextRequestStateChanged()
updateRequests(reason string)
writeInterested(interested bool) bool
drop()
String() string
connStatusString() string
- writeBufferFull() bool
}
pc, ok := p.peerImpl.(*PeerConn)
return pc, ok
}
-
-func (p *PeerConn) onNextRequestStateChanged() {
- p.tickleWriter()
-}
var _ peerImpl = (*webseedPeer)(nil)
-func (me *webseedPeer) writeBufferFull() bool {
- return false
-}
-
func (me *webseedPeer) connStatusString() string {
return me.client.Url
}
}
}
}
-
-func (me *webseedPeer) onNextRequestStateChanged() {
- me.peer.applyNextRequestState()
-}