Package DebTorrent :: Package BT1 :: Module Connecter
[hide private]
[frames] | no frames]

Module Connecter

source code

For maintaining connections to peers.

Classes [hide private]
  Connection
A connection to an individual peer.
  Connecter
A collection of all connections to peers.
Variables [hide private]
logging.Logger logger = logging.getLogger('DebTorrent.BT1.Connecter')
the logger to send all log messages to for this module
char CHOKE = '\x00'
the code for choke messages
char UNCHOKE = '\x01'
the code for unchoke messages
char INTERESTED = '\x02'
the code for interested messages
char NOT_INTERESTED = '\x03'
the code for not interested messages
char HAVE = '\x04'
the code for have messages
char BITFIELD = '\x05'
the code for bitfield messages
char REQUEST = '\x06'
the code for request messages
char PIECE = '\x07'
the code for piece messages
char CANCEL = '\x08'
the code for cancel messages

Imports: bitfield.Bitfield, clock.clock, binascii.b2a_hex, struct, logging