Package tp :: Package netlib :: Module twist :: Class TwistedConnection
[show private | hide private]
[frames | no frames]

Type TwistedConnection

      object --+    
               |    
ConnectionCommon --+
                   |
BaseProtocol --+   |
               |   |
        Protocol --+
                   |
                  TwistedConnection

Known Subclasses:
TestableConnection

Method Summary
  __init__(self, *args, **kw)
  dataReceived(self, data)
Called whenever data is received.
  _recvBytes(self, size, peek)
Receive a bunch of bytes onto the socket.
  _sendBytes(self, bytes)
Send bytes onto the socket.
    Inherited from ConnectionCommon
  _description_error(self, packet)
Called when we get a packet which hasn't be described.
  _error(self, packet)
  _processBytes(self)
  _processFrame(self, sequences)
  _recvFrame(self, sequence)
Reads a single TP packet with correct sequence number from the socket.
  _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)...
    Inherited from Protocol
  connectionLost(self, reason)
Called when the connection is shut down.
    Inherited from BaseProtocol
  connectionMade(self)
Called when a connection is made.
  makeConnection(self, transport)
Make a connection to a transport and a server.

Class Variable Summary
    Inherited from Protocol
Implements __implemented__ = <implementedBy twisted.internet.protoc...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
    Inherited from BaseProtocol
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
int connected = 0                                                                     
NoneType transport = None                                                                  

Method Details

dataReceived(self, data)

Called whenever data is received.

Use this method to translate to a higher-level message.  Usually, some
callback will be made upon the receipt of each complete protocol
message.

@param data: a string of indeterminate length.  Please keep in mind
    that you will probably need to buffer some data, as partial
    (or multiple) protocol messages may be received!  I recommend
    that unit tests for protocols call through to this method with
    differing chunk sizes, down to one byte at a time.
Overrides:
twisted.internet.protocol.Protocol.dataReceived (inherited documentation)

_recvBytes(self, size, peek=False)

Receive a bunch of bytes onto the socket.
Overrides:
tp.netlib.common.ConnectionCommon._recvBytes

_sendBytes(self, bytes='')

Send bytes onto the socket.
Overrides:
tp.netlib.common.ConnectionCommon._sendBytes

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