|
@@ -17,11 +17,13 @@ class RelayNetMsg(network.NetMsg):
|
|
|
|
|
|
|
|
|
|
class RelayGetConsensusMsg(RelayNetMsg):
|
|
class RelayGetConsensusMsg(RelayNetMsg):
|
|
- """The subclass of RelayNetMsg for fetching the consensus."""
|
|
+ """The subclass of RelayNetMsg for fetching the consensus. Sent by
|
|
|
|
+ clients to relays."""
|
|
|
|
|
|
|
|
|
|
class RelayConsensusMsg(RelayNetMsg):
|
|
class RelayConsensusMsg(RelayNetMsg):
|
|
- """The subclass of RelayNetMsg for returning the consensus."""
|
|
+ """The subclass of RelayNetMsg for returning the consensus from
|
|
|
|
+ relays to clients, in response to RelayGetConsensusMsg."""
|
|
|
|
|
|
def __init__(self, consensus):
|
|
def __init__(self, consensus):
|
|
self.consensus = consensus
|
|
self.consensus = consensus
|
|
@@ -29,14 +31,16 @@ class RelayConsensusMsg(RelayNetMsg):
|
|
|
|
|
|
class RelayGetConsensusDiffMsg(RelayNetMsg):
|
|
class RelayGetConsensusDiffMsg(RelayNetMsg):
|
|
"""The subclass of RelayNetMsg for fetching the consensus, if the
|
|
"""The subclass of RelayNetMsg for fetching the consensus, if the
|
|
- requestor already has the previous consensus."""
|
|
+ requestor already has the previous consensus. Sent by clients to
|
|
|
|
+ relays."""
|
|
|
|
|
|
|
|
|
|
class RelayConsensusDiffMsg(RelayNetMsg):
|
|
class RelayConsensusDiffMsg(RelayNetMsg):
|
|
"""The subclass of RelayNetMsg for returning the consensus, if the
|
|
"""The subclass of RelayNetMsg for returning the consensus, if the
|
|
requestor already has the previous consensus. We don't _actually_
|
|
requestor already has the previous consensus. We don't _actually_
|
|
produce the diff at this time; we just charge fewer bytes for this
|
|
produce the diff at this time; we just charge fewer bytes for this
|
|
- message."""
|
|
+ message. Sent by relays to clients in response to
|
|
|
|
+ RelayGetConsensusDiffMsg."""
|
|
|
|
|
|
def __init__(self, consensus):
|
|
def __init__(self, consensus):
|
|
self.consensus = consensus
|
|
self.consensus = consensus
|
|
@@ -60,7 +64,8 @@ class RelayRandomHopMsg(RelayNetMsg):
|
|
|
|
|
|
|
|
|
|
class CircuitCellMsg(RelayNetMsg):
|
|
class CircuitCellMsg(RelayNetMsg):
|
|
- """Send a message tagged with a circuit id."""
|
|
+ """Send a message tagged with a circuit id. This is the container
|
|
|
|
+ class for all RelayCell messages."""
|
|
|
|
|
|
def __init__(self, circuitid, cell):
|
|
def __init__(self, circuitid, cell):
|
|
self.circid = circuitid
|
|
self.circid = circuitid
|