FedP2P/peer-impl.go

24 lines
605 B
Go
Raw Normal View History

2020-06-02 15:41:59 +08:00
package torrent
import (
"github.com/anacrolix/torrent/metainfo"
)
// Contains implementation details that differ between peer types, like Webseeds and regular
// BitTorrent protocol connections. Some methods are underlined so as to avoid collisions with
// legacy PeerConn methods.
type peerImpl interface {
updateRequests()
writeInterested(interested bool) bool
cancel(Request) bool
2020-06-02 15:41:59 +08:00
// Return true if there's room for more activity.
request(Request) bool
2020-06-02 15:41:59 +08:00
connectionFlags() string
2021-01-04 12:51:23 +08:00
onClose()
_postCancel(Request)
2020-06-02 15:41:59 +08:00
onGotInfo(*metainfo.Info)
drop()
String() string
connStatusString() string
2020-06-02 15:41:59 +08:00
}