Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Peer ¶
type Peer struct { *peerconn.Conn AmChoking bool AmInterested bool PeerChoking bool PeerInterested bool OptimisticUnchoked bool // Snubbed means peer is sending pieces too slow. Snubbed bool Downloading bool BytesDownlaodedInChokePeriod int64 BytesUploadedInChokePeriod int64 // Messages received while we don't have info yet are saved here. Messages []interface{} ExtensionHandshake *peerprotocol.ExtensionHandshakeMessage PEX *pex // contains filtered or unexported fields }
func (*Peer) ResetSnubTimer ¶
func (p *Peer) ResetSnubTimer()
func (*Peer) Run ¶
func (p *Peer) Run(messages chan Message, pieces chan PieceMessage, snubbed, disconnect chan *Peer)
func (*Peer) StopSnubTimer ¶
func (p *Peer) StopSnubTimer()
type PieceMessage ¶
type PieceMessage struct { *Peer Piece peerreader.Piece }
Click to show internal directories.
Click to hide internal directories.