class documentation

class Name: (source)

Implements interfaces: twisted.names.dns.IEncodable

View In Hierarchy

A name in the domain name system, made up of multiple labels. For example, twistedmatrix.com.
Method __eq__ Undocumented
Method __hash__ Undocumented
Method __init__
Method __str__ Represent this Name instance by its string name.
Method decode Decode a byte string into this Name.
Method encode Encode this Name into the appropriate byte format.
Instance Variable name A byte string giving the name.
def __eq__(self, other): (source)

Undocumented

Parameters
other:objectUndocumented
Returns
boolUndocumented
def __hash__(self): (source)

Undocumented

def __init__(self, name=b''): (source)
Parameters
name:bytes or strA name.
def __str__(self): (source)
Represent this Name instance by its string name.
Returns
strUndocumented
def decode(self, strio, length=None): (source)
Decode a byte string into this Name.
Parameters
strio:fileBytes will be read from this file until the full Name is decoded.
lengthUndocumented
Raises
EOFErrorRaised when there are not enough bytes available from strio.
ValueErrorRaised when the name cannot be decoded (for example, because it contains a loop).
def encode(self, strio, compDict=None): (source)
Encode this Name into the appropriate byte format.
Parameters
strio:fileThe byte representation of this Name will be written to this file.
compDict:dictdictionary of Names that have already been encoded and whose addresses may be backreferenced by this Name (for the purpose of reducing the message size).
A byte string giving the name.