Home | Trees | Index | Help |
---|
Package tlslite :: Package integration :: Module AsyncStateMachine :: Class AsyncStateMachine |
|
TLSAsyncDispatcherMixIn
,
TLSTwistedProtocolWrapper
This is an abstract class that's used to integrate TLS Lite with asyncore and Twisted.
This class signals wantsReadsEvent() and wantsWriteEvent(). When the underlying socket has become readable or writeable, the event should be passed to this class by calling inReadEvent() or inWriteEvent(). This class will then try to read or write through the socket, and will update its state appropriately.
This class will forward higher-level events to its subclass. For example, when a complete TLS record has been received, outReadEvent() will be called with the decrypted data.Method Summary | |
---|---|
__init__(self)
| |
Tell the state machine it can read from the socket. | |
Tell the state machine it can write to the socket. | |
Called when a close operation completes. | |
Called when a handshake operation completes. | |
Called when a read operation completes. | |
Called when a write operation completes. | |
Start a close operation. | |
Start a handshake operation. | |
Start a handshake operation. | |
Start a write operation. | |
bool or None |
If the state machine wants to read. |
bool or None |
If the state machine wants to write. |
Method Details |
---|
inReadEvent(self)Tell the state machine it can read from the socket. |
inWriteEvent(self)Tell the state machine it can write to the socket. |
outCloseEvent(self)Called when a close operation completes. May be overridden in subclass. |
outConnectEvent(self)Called when a handshake operation completes. May be overridden in subclass. |
outReadEvent(self, readBuffer)Called when a read operation completes. May be overridden in subclass. |
outWriteEvent(self)Called when a write operation completes. May be overridden in subclass. |
setCloseOp(self)Start a close operation. |
setHandshakeOp(self, handshaker)Start a handshake operation.
|
setServerHandshakeOp(self, **args)Start a handshake operation. The arguments passed to this function will be forwarded totlslite.TLSConnection.TLSConnection.handshakeServerAsync .
|
setWriteOp(self, writeBuffer)Start a write operation.
|
wantsReadEvent(self)If the state machine wants to read. If an operation is active, this returns whether or not the operation wants to read from the socket. If an operation is not active, this returns None.
|
wantsWriteEvent(self)If the state machine wants to write. If an operation is active, this returns whether or not the operation wants to write to the socket. If an operation is not active, this returns None.
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.0 on Mon Feb 21 21:56:55 2005 | http://epydoc.sf.net |