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.
    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.

Class Variable Summary
    Inherited from Protocol
Implements __implemented__ = <implementedBy twisted.internet.protoc...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

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)

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