Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Conn net.Conn Choked bool Bitfield bitfield.Bitfield // contains filtered or unexported fields }
A Client is a TCP connection with a peer
func New ¶
New connects with a peer, completes a handshake, and receives a handshake returns an err if any of those fail.
func (*Client) SendInterested ¶
SendInterested sends an Interested message to the peer
func (*Client) SendNotInterested ¶
SendNotInterested sends a NotInterested message to the peer
func (*Client) SendRequest ¶
SendRequest sends a Request message to the peer
func (*Client) SendUnchoke ¶
SendUnchoke sends an Unchoke message to the peer
Click to show internal directories.
Click to hide internal directories.