Package Anomos :: Package Protocol :: Module AnomosNeighborProtocol :: Class AnomosNeighborProtocol
[hide private]
[frames] | no frames]

Class AnomosNeighborProtocol

source code

    object --+    
             |    
AnomosProtocol --+
                 |
                AnomosNeighborProtocol
Known Subclasses:

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
format_message(self, stream_id, message)
Anomos messages are slightly different from BitTorrent messages because of the virtual streams used to keep the number of active connections low.
source code
 
invalid_message(self, t) source code
 
got_partial(self, message) source code
 
got_tcode(self, message) source code

Inherited from AnomosProtocol: got_message, network_ctl_msg

Inherited from AnomosProtocol (private): _valid_msg_len

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

format_message(self, stream_id, message)

source code 

Anomos messages are slightly different from BitTorrent messages because of the virtual streams used to keep the number of active connections low. All messages are prefixed with a 2-byte Stream ID. The format is thus: [StreamID][Message Length][Type][Payload]

Parameters:
  • type - TCODE, RELAY, BREAK, CHOKE, etc...
  • message - Message type appropriate payload
Overrides: AnomosProtocol.format_message
(inherited documentation)

invalid_message(self, t)

source code 
Overrides: AnomosProtocol.invalid_message