class documentation

class twisted.protocols.amp._TLSBox(AmpBox): (source)

View In Hierarchy

I am an AmpBox that, upon being sent, initiates a TLS connection.

Class Variable __slots__ Undocumented
Method __init__ Initialize a new AmpBox.
Property certificate Undocumented
Property verify Undocumented
Method _sendTo Send my encoded value to the protocol, then initiate TLS.

Inherited from AmpBox:

Method copy Return another AmpBox just like me.
Method serialize Convert me into a wire-encoded string.
Method __repr__ Undocumented
__slots__ = (source)

Undocumented

(type: List[str])
def __init__(self): (source)

Initialize a new AmpBox.

In Python 3, keyword arguments MUST be Unicode/native strings whereas in Python 2 they could be either byte strings or Unicode strings.

However, all keys of an AmpBox MUST be byte strings, or possible to transparently coerce into byte strings (i.e. Python 2).

In Python 3, therefore, native string keys are coerced to byte strings by encoding as ASCII. This can result in UnicodeEncodeError being raised.

ParametersargsSee dict, but all keys and values should be bytes. On Python 3, native strings may be used as keys provided they contain only ASCII characters.
kwSee dict, but all keys and values should be bytes. On Python 3, native strings may be used as keys provided they contain only ASCII characters.
RaisesUnicodeEncodeErrorWhen a native string key cannot be coerced to an ASCII byte string (Python 3 only).
@property
certificate = (source)

Undocumented

@property
verify = (source)

Undocumented

def _sendTo(self, proto): (source)

Send my encoded value to the protocol, then initiate TLS.

API Documentation for Twisted, generated by pydoctor 20.12.1 at 2021-02-28 19:53:36.