MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / handle_connection

Function handle_connection

example_code/item_076.py:221–227  ·  view source on GitHub ↗
(connection)

Source from the content-addressed store, hash-verified

219from threading import Thread
220
221def handle_connection(connection):
222 with connection:
223 session = ServerSession(connection)
224 try:
225 session.loop()
226 except EOFError:
227 pass
228
229def run_server(address):
230 with socket.socket() as listener:

Callers

nothing calls this directly

Calls 2

loopMethod · 0.95
ServerSessionClass · 0.85

Tested by

no test coverage detected