import (
"github.com/RoaringBitmap/roaring"
+
"github.com/anacrolix/torrent/metainfo"
)
type peerImpl interface {
// Trigger the actual request state to get updated
handleUpdateRequests()
- // Whether the outstanding local request cardinality is low enough to warrant an update.
- isLowOnRequests() bool
writeInterested(interested bool) bool
- // Neither of these return buffer room anymore, because they're currently both posted. There's
- // also PeerConn.writeBufferFull for when/where it matters.
- _cancel(RequestIndex)
+ // _cancel initiates cancellation of a request and returns acked if it expects the cancel to be
+ // handled by a follow-up event.
+ _cancel(RequestIndex) (acked bool)
_request(Request) bool
connectionFlags() string
onClose()
onGotInfo(*metainfo.Info)
+ // Drop connection. This may be a no-op if there is no connection.
drop()
+ // Rebuke the peer
+ ban()
String() string
- connStatusString() string
+ peerImplStatusLines() []string
// All if the peer should have everything, known if we know that for a fact. For example, we can
// guess at how many pieces are in a torrent, and assume they have all pieces based on them