MCPcopy Index your code
hub / github.com/RustPython/RustPython / server

Method server

Lib/test/test_asyncio/test_streams.py:900–906  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

898 q = queue.Queue()
899
900 def server():
901 # Runs in a separate thread.
902 with socket.create_server(('localhost', 0)) as sock:
903 addr = sock.getsockname()
904 q.put(addr)
905 clt, _ = sock.accept()
906 clt.close()
907
908 async def client(host, port):
909 reader, writer = await asyncio.open_connection(host, port)

Callers

nothing calls this directly

Calls 5

create_serverMethod · 0.45
getsocknameMethod · 0.45
putMethod · 0.45
acceptMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected