MCPcopy Create free account
hub / github.com/rthalley/dnspython / __init__

Method __init__

dns/renderer.py:103–120  ·  view source on GitHub ↗

Initialize a new renderer.

(self, id=None, flags=0, max_size=65535, origin=None)

Source from the content-addressed store, hash-verified

101 """
102
103 def __init__(self, id=None, flags=0, max_size=65535, origin=None):
104 """Initialize a new renderer."""
105
106 self.output = io.BytesIO()
107 if id is None:
108 self.id = random.randint(0, 65535)
109 else:
110 self.id = id
111 self.flags = flags
112 self.max_size = max_size
113 self.origin = origin
114 self.compress = {}
115 self.section = QUESTION
116 self.counts = [0, 0, 0, 0]
117 self.output.write(b"\x00" * 12)
118 self.mac = ""
119 self.reserved = 0
120 self.was_padded = False
121
122 def _rollback(self, where):
123 """Truncate the output buffer at offset *where*, and remove any

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected