| Home | Trees | Index | Help |
|---|
| Package tp :: Package netlib :: Module twist :: Class TwistedConnection |
|
object --+
|
ConnectionCommon --+
|
BaseProtocol --+ |
| |
Protocol --+
|
TwistedConnection
TestableConnection| Method Summary | |
|---|---|
__init__(self,
*args,
**kw)
| |
Called whenever data is received. | |
Receive a bunch of bytes onto the socket. | |
Send bytes onto the socket. | |
| Inherited from ConnectionCommon | |
Called when we get a packet which hasn't be described. | |
| |
| |
| |
Reads a single TP packet with correct sequence number from the socket. | |
Write a single TP packet to the socket. | |
Called when a packet of the wrong version is found. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name... | |
x.__getattribute__('name') <==> x.name... | |
x.__hash__() <==> hash(x)... | |
T.__new__(S, ...) -> a new object with type S, a subtype of T... | |
helper for pickle... | |
helper for pickle... | |
x.__repr__() <==> repr(x)... | |
x.__setattr__('name', value) <==> x.name = value... | |
x.__str__() <==> str(x)... | |
| Inherited from Protocol | |
Called when the connection is shut down. | |
| Inherited from BaseProtocol | |
Called when a connection is made. | |
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.
|
_recvBytes(self, size, peek=False)Receive a bunch of bytes onto the socket.
|
_sendBytes(self, bytes='')Send bytes onto the socket.
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Fri Jan 1 08:00:27 2010 | http://epydoc.sf.net |