2020-06-02 07:41:59 +00: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 {
|
2021-10-20 23:28:57 +00:00
|
|
|
// Trigger the actual request state to get updated
|
|
|
|
handleUpdateRequests()
|
2021-10-20 23:48:43 +00:00
|
|
|
// Whether the outstanding local request cardinality is low enough to warrant an update.
|
|
|
|
isLowOnRequests() bool
|
2020-06-02 07:41:59 +00:00
|
|
|
writeInterested(interested bool) bool
|
2021-05-09 13:38:38 +00:00
|
|
|
|
|
|
|
// Neither of these return buffer room anymore, because they're currently both posted. There's
|
|
|
|
// also PeerConn.writeBufferFull for when/where it matters.
|
2021-10-12 23:16:56 +00:00
|
|
|
_cancel(RequestIndex) bool
|
2021-05-20 10:23:45 +00:00
|
|
|
_request(Request) bool
|
2021-05-09 13:38:38 +00:00
|
|
|
|
2020-06-02 07:41:59 +00:00
|
|
|
connectionFlags() string
|
2021-01-04 04:51:23 +00:00
|
|
|
onClose()
|
2020-06-02 07:41:59 +00:00
|
|
|
onGotInfo(*metainfo.Info)
|
|
|
|
drop()
|
2020-06-04 01:50:20 +00:00
|
|
|
String() string
|
2020-09-29 06:21:54 +00:00
|
|
|
connStatusString() string
|
2020-06-02 07:41:59 +00:00
|
|
|
}
|