class documentation

A class to represent OPT record variable options.

See Also
_OPTVariableOption.__init__ for documentation of public instance attributes.
Present Since
Method __init__ No summary
Method decode Decode bytes into an _OPTVariableOption instance.
Method encode Encode this _OPTVariableOption to bytes.
Class Variable compareAttributes Undocumented
Class Variable showAttributes Undocumented
Instance Variable code Undocumented
Instance Variable data Undocumented
Class Variable _fmt Undocumented

Inherited from FancyStrMixin:

Method __str__ Undocumented

Inherited from FancyEqMixin (via FancyStrMixin):

Method __eq__ Undocumented
Method __ne__ Undocumented
def __init__(self, code=0, data=b''): (source)
code:intThe option code
data:bytesThe option data
def decode(self, strio, length=None): (source)

Decode bytes into an _OPTVariableOption instance.

strio:fileBytes will be read from this file until the full _OPTVariableOption is decoded.
length:int or NoneNot used.
def encode(self, strio, compDict=None): (source)

Encode this _OPTVariableOption to bytes.

strio:filethe byte representation of this _OPTVariableOption will be written to this file.
compDict:dict or NoneA dictionary of backreference addresses that have already been written to this stream and that may be used for DNS name compression.
compareAttributes: tuple[str, ...] = (source)