Part of twisted.protocols.amp View Source View In Hierarchy
Known subclasses: twisted.protocols.amp._ParserHelper
| Class | __metaclass__ | Metaclass hack to record decorators. |
| Method | __repr__ | A verbose string representation which gives us information about this AMP |
| Method | _lock | Lock this Amp instance so that no further Amp traffic may be sent. |
| Method | _switchTo | Switch this Amp instance to a new protocol. You need to do this |
| Method | _sendBox | Send a amp.Box to my peer. |
| Method | makeConnection | When a connection is first established, AMP clients send a greeting but |
| Method | _getPeerCertificate | Undocumented |
| Method | _prepareTLS | Used by StartTLSCommand to put us into the state where we don't |
| Method | _startTLS | Used by TLSBox to initiate the SSL handshake. |
| Method | _defaultStartTLSResponder | The default TLS responder doesn't specify any certificate or anything. |
| Method | connectionLost | Terminate all outstanding request deferreds, and notify nested protocol |
| Method | dataReceived | Either parse incoming data as AMP packets or relay it to our nested |
| Method | proto_init | String received in the 'init' state. |
| Method | proto_key | String received in the 'key' state. If the key is empty, a complete |
| Method | proto_value | String received in the 'value' state. |
Inherited from StatefulStringProtocol:
| Method | stringReceived | Choose a protocol phase function and call it. |
Inherited from Int16StringReceiver:
| Method | stringReceived | Override this. |
| Method | sendString | Send an int16-prefixed string to the other end of the connection. |
Inherited from BaseProtocol (via Int16StringReceiver, Protocol):
| Method | connectionMade | Called when a connection is made. |
Inherited from _PauseableMixin (via Int16StringReceiver):
| Method | pauseProducing | Undocumented |
| Method | resumeProducing | Undocumented |
| Method | stopProducing | Undocumented |
Inherited from _AmpParserBase:
| Method | __init__ | Create an _AmpParserBase, initializing request-response tracking state. |
| Method | _puke | This is a terminal callback called after application code has had a |
| Method | _nextTag | Generate protocol-local serial numbers for _ask keys. |
| Method | failAllOutgoing | Call the errback on all outstanding requests awaiting responses. |
| Method | ampBoxReceived | An AmpBox was received. Respond to it according to its contents. |
| Method | _sendBoxCommand | Send a command across the wire with the given
amp.Box.
|
| Method | callRemoteString | This is a low-level API, designed only for opitmizing simple messages |
| Method | callRemote | This is the primary high-level API for sending messages via AMP. Invoke it |
Inherited from _DispatchMixin (via _AmpParserBase):
| Method | _wrapWithSerialization | Wrap aCallable with its command's argument de-serialization |
| Method | lookupFunction | Return a callable to invoke when executing the named command. |
| Method | dispatchCommand | A box with a _command key was received. |
| Parameters | newProto | the new protocol instance. |
| clientFactory | the ClientFactory to send notifications to. |
Send a amp.Box to my peer.
Note: transport.write is never called outside of this method.| Parameters | completeBox | an AmpBox. |
_sendBox.
| Parameters | certificate | a twisted.internet.ssl.PrivateCertificate
for use locally.
|
| verifyAuthorities | twisted.internet.ssl.Certificate
instances representing certificate authorities which will verify our
peer.
|
The default TLS responder doesn't specify any certificate or anything.
From a security perspective, it's little better than a plain-text connection - but it is still a *bit* better, so it's included for convenience.
You probably want to override this by providing your own StartTLS.responder.