Home | Trees | Indices | Help |
---|
|
object --+ | _SocketWrapper --+ | StatefulProtocol
A socket wrapper similar to Twisted's StatefulProtocol.
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
Wrap a socket for stateful reads. The buffer_size parameter indicates how much should be read from the socket at a time.
|
Get the initial state for the StatefulProtocol. This function must return a tuple of (some_callable, bytes_to_read), where the callable will be called when that number of bytes has been read, with those same bytes as the only argument. That callable can return None to keep the same (callable, n_bytes) state, or return a new (callable, n_bytes) tuple. |
Pump the buffer and try to make as many callbacks as possible. If the socket is closed, a SocketClosedError is raised. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Sat Aug 14 14:34:16 2010 | http://epydoc.sourceforge.net |