| Home | Trees | Indices | Help |
|
|---|
|
|
twisted.internet.protocol.BaseProtocol --+
|
twisted.internet.protocol.Protocol --+
|
Banana
|
|||
| slicerClass | |||
| unslicerClass | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
paused = False
|
|||
streamable = True
|
|||
debugSend = False
|
|||
debugReceive = False
|
|||
logViolations = False
|
|||
logReceiveErrors = True
|
|||
useKeepalives = False
|
|||
keepaliveTimeout = None
|
|||
keepaliveTimer = None
|
|||
disconnectTimeout = None
|
|||
disconnectTimer = None
|
|||
__implemented__ = <implementedBy foolscap.banana.Banana>
|
|||
__provides__ = <zope.interface.declarations.ClassProvides obje
|
|||
|
Inherited from |
|||
|
|||
|
I expect a list of strings. I will populate my initial vocab table (both inbound and outbound) with this list. It is not safe to use this method once anything has been serialized onto the wire. This method can only be used to set up the initial vocab table based upon a negotiated set of common words. The 'initial-vocab-table-index' parameter is used to decide upon the contents of this table. |
Called when a connection is made. This may be considered the initializer of the protocol, because it is called when the connection is completed. For clients, this is called once the connection to the server has been established; for servers, this is called after an accept() call stops blocking and a socket has been received. If you need to send any greeting or initial message, do it here.
|
Called when the connection is shut down. Clear any circular references here, and any external references to this Protocol. The connection has been closed.
|
Schedule a replacement of the outbound VOCAB table. Higher-level code may call this at any time with a list of strings. Immediately after the replacement has occured, the outbound VOCAB table will contain all of the strings in vocabStrings and nothing else. This table tells the token-sending code which strings to abbreviate with short integers in a VOCAB token. This function can be called at any time (even while the protocol is in the middle of serializing and transmitting some other object) because it merely schedules a replacement to occur at some point in the future. A special marker (the ReplaceVocabSlicer) is placed in the outbound queue, and the table replacement will only happend after all the items ahead of that marker have been serialized. At the same time the table is replaced, a (set-vocab..) sequence will be serialized towards the far end. This insures that we set our outbound table at the same 'time' as the far end starts using it. |
Schedule 'value' for addition to the outbound VOCAB table. This may be called at any time. If the string is already scheduled for addition, or if it is already in the VOCAB table, it will be ignored. (TODO: does this introduce an annoying-but-not-fatal race condition?) The string will not actually be added to the table until the outbound serialization queue has been serviced. |
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.
|
|
|||
__provides__
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue Oct 14 18:27:47 2008 | http://epydoc.sourceforge.net |