Implements interfaces: twisted.names.dns.IEncodable

A class to represent OPT record variable options.

See Also_OPTVariableOption.__init__ for documentation of public instance attributes.
https://tools.ietf.org/html/rfc6891#section-6.1.2
Present Since13.2
Method __init__
Method encode Encode this _OPTVariableOption to bytes.
Method decode Decode bytes into an _OPTVariableOption instance.

Inherited from FancyStrMixin:

Method __str__ Undocumented

Inherited from FancyEqMixin:

Method __eq__ Undocumented
Method __ne__ Undocumented
def __init__(self, code=0, data=''): (source)
ParameterscodeThe option code (type: int)
dataThe option data (type: bytes)
def encode(self, strio, compDict=None): (source)

Encode this _OPTVariableOption to bytes.

Parametersstriothe byte representation of this _OPTVariableOption will be written to this file. (type: file)
compDictA dictionary of backreference addresses that have already been written to this stream and that may be used for DNS name compression. (type: dict or None)
def decode(self, strio, length=None): (source)

Decode bytes into an _OPTVariableOption instance.

ParametersstrioBytes will be read from this file until the full _OPTVariableOption is decoded. (type: file)
lengthNot used. (type: int or None)
API Documentation for Twisted, generated by pydoctor at 2018-07-14 04:53:34.