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

Method main

tests/nanonameserver.py:390–408  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

388 self.caught("serve_doh", e)
389
390 async def main(self):
391 handlers = {
392 ConnectionType.UDP: self.serve_udp,
393 ConnectionType.TCP: self.orchestrate_tcp,
394 ConnectionType.DOT: self.orchestrate_tcp,
395 ConnectionType.DOH: self.serve_doh,
396 ConnectionType.DOH3: self.serve_doh,
397 ConnectionType.DOQ: self.serve_doq,
398 }
399
400 try:
401 async with trio.open_nursery() as nursery:
402 if self.use_thread:
403 nursery.start_soon(self.wait_for_input_or_eof)
404 for connection_type in self.protocols:
405 nursery.start_soon(handlers[connection_type], connection_type)
406
407 except Exception as e:
408 self.caught("nanoserver main", e)
409
410 def run(self):
411 if not self.use_thread:

Callers 15

test_nsec3_hash.pyFile · 0.80
test_nsec3.pyFile · 0.80
test_doh.pyFile · 0.80
test_update.pyFile · 0.80
test_bugs.pyFile · 0.80
test_dnssec.pyFile · 0.80
test_zone.pyFile · 0.80
test_generate.pyFile · 0.80
test_grange.pyFile · 0.80

Calls 1

caughtMethod · 0.95

Tested by

no test coverage detected