MCPcopy Index your code
hub / github.com/python/cpython / run_server

Method run_server

Lib/test/test_httplib.py:1483–1493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1481
1482 result = None
1483 def run_server():
1484 [conn, address] = serv.accept()
1485 with conn, conn.makefile("rb") as reader:
1486 # Read the request header until a blank line
1487 while True:
1488 line = reader.readline()
1489 if not line.rstrip(b"\r\n"):
1490 break
1491 conn.sendall(b"HTTP/1.1 200 Connection established\r\n\r\n")
1492 nonlocal result
1493 result = reader.read()
1494
1495 thread = threading.Thread(target=run_server)
1496 thread.start()

Callers

nothing calls this directly

Calls 7

acceptMethod · 0.45
makefileMethod · 0.45
readlineMethod · 0.45
rstripMethod · 0.45
sendallMethod · 0.45
readMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected