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 {
|
2021-05-20 18:23:45 +08:00
|
|
|
onNextRequestStateChanged()
|
2020-06-02 15:41:59 +08:00
|
|
|
updateRequests()
|
|
|
|
writeInterested(interested bool) bool
|
2021-05-09 21:38:38 +08: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-05-20 18:23:45 +08:00
|
|
|
_cancel(Request) bool
|
|
|
|
_request(Request) bool
|
2021-05-09 21:38:38 +08:00
|
|
|
|
2020-06-02 15:41:59 +08:00
|
|
|
connectionFlags() string
|
2021-01-04 12:51:23 +08:00
|
|
|
onClose()
|
2020-06-02 15:41:59 +08:00
|
|
|
onGotInfo(*metainfo.Info)
|
|
|
|
drop()
|
2020-06-04 09:50:20 +08:00
|
|
|
String() string
|
2020-09-29 14:21:54 +08:00
|
|
|
connStatusString() string
|
2021-05-09 12:14:11 +08:00
|
|
|
writeBufferFull() bool
|
2020-06-02 15:41:59 +08:00
|
|
|
}
|