| |
- exceptions.Exception
-
- SocketCreationError
- Peer
-
- PingedPeer
- TargetPeer
- Peers
-
- TargetPeers
class Peer |
|
A Peer is a distant host to which we are connected.
It provides two file like objects rfile and wfile for reading(receiving)
and writing(sending).
It also has methods to know for how much time it has been Idle |
|
Methods defined here:
- _Peer__createRWFile = __createRWFile(self, socket)
- _Peer__createReader = __createReader(self)
- _Peer__createRouter = __createRouter(self)
- You could possibly have passed an existing router on __init__
- _Peer__createSocket = __createSocket(self)
- _Peer__startReader = __startReader(self)
- _Peer__startReaderRouter = __startReaderRouter(self)
- _Peer__startRouter = __startRouter(self)
- __init__(self, address, router, connection=None)
- -address is the address from which the peer is coming
-connection is the socket objet
- active(self)
- To be called when some activity is seen from this peer.
- address(self)
- close(self)
- Close all files associated with the peer and the connection
- closed(self)
- connectToPeer(self)
- getAddress(self)
- idleFor(self)
- reader(self)
- router(self)
- sendMessage(self, message)
Data and non-method functions defined here:
- ROUTER_DEFAULT_SIZE = 20
- __doc__ = ' A Peer is a distant host to which we are connec... know for how much time it has been Idle\n '
- __module__ = 'common.peer'
|
|