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 ConnectedAt time.Time Source Source Bitfield *bitfield.Bitfield AllowedFast pieceset.PieceSet ID [20]byte ExtensionsEnabled bool FastEnabled bool EncryptionCipher mse.CryptoMethod ClientInterested bool ClientChoking bool PeerInterested bool PeerChoking bool OptimisticUnchoked bool // Snubbed means peer is sending pieces too slow. Snubbed bool Downloading bool // 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) DownloadSpeed ¶ added in v0.3.0
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()
func (*Peer) UploadSpeed ¶ added in v0.3.0
type PieceMessage ¶
type PieceMessage struct { *Peer Piece peerreader.Piece }
Click to show internal directories.
Click to hide internal directories.