]> Sergey Matveev's repositories - btrtrc.git/blob - peer-impl.go
Fix conn status string for WebRTC connections
[btrtrc.git] / peer-impl.go
1 package torrent
2
3 import (
4         "github.com/anacrolix/torrent/metainfo"
5 )
6
7 // Contains implementation details that differ between peer types, like Webseeds and regular
8 // BitTorrent protocol connections. Some methods are underlined so as to avoid collisions with
9 // legacy PeerConn methods.
10 type peerImpl interface {
11         updateRequests()
12         writeInterested(interested bool) bool
13         cancel(request) bool
14         // Return true if there's room for more activity.
15         request(request) bool
16         connectionFlags() string
17         _close()
18         _postCancel(request)
19         onGotInfo(*metainfo.Info)
20         drop()
21         String() string
22         connStatusString() string
23 }