[][src]Module cratetorrent::peer

This module defines the implementation of the BitTorrent peer wire protocol.

The main type responsible for communication with a peer is a [PeerSession]. Making use of the BitTorrent byte protocol codec implementation, this type implements the high-level operations of the protocol.

Each peer session is spawned within a torrent and cannot be used without one, due to making use of shared data in torrent.

Modules

error

Structs

SessionState

Contains the state of both sides of the connection.

Enums

ConnectionState

At any given time, a connection with a peer is in one of the below states.