Package tp :: Package netlib :: Module common :: Class ConnectionCommon
[show private | hide private]
[frames | no frames]

Type ConnectionCommon

object --+
         |
        ConnectionCommon

Known Subclasses:
Connection, TwistedConnection

Base class for Thousand Parsec protocol connections.
Methods common to both server and client connections
go here.

Method Summary
  __init__(self)
  _description_error(self, packet)
Called when we get a packet which hasn't be described.
  _error(self, packet)
  _processBytes(self)
  _processFrame(self, sequences)
  _recvBytes(self, size, peek)
  _recvFrame(self, sequence)
Reads a single TP packet with correct sequence number from the socket.
  _sendBytes(self, bytes)
  _sendFrame(self, frame)
Write a single TP packet to the socket.
  _version_error(self, h)
Called when a packet of the wrong version is found.
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name...
  __getattribute__(...)
x.__getattribute__('name') <==> x.name...
  __hash__(x)
x.__hash__() <==> hash(x)...
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle...
  __reduce_ex__(...)
helper for pickle...
  __repr__(x)
x.__repr__() <==> repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value...
  __str__(x)
x.__str__() <==> str(x)...

Method Details

_description_error(self, packet)

Called when we get a packet which hasn't be described.

The packet will be of type Header ready to be morphed by calling
process as follows,

p.process(p._data)

_recvFrame(self, sequence)

Reads a single TP packet with correct sequence number from the socket.

_sendFrame(self, frame=None)

Write a single TP packet to the socket.

_version_error(self, h)

Called when a packet of the wrong version is found.

The function should either raise the error or return a
packet with the correct version.

Generated by Epydoc 2.1 on Fri Jan 1 08:00:27 2010 http://epydoc.sf.net