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

Method serve

Lib/test/test_ssl.py:4052–4063  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4050 finish = False
4051
4052 def serve():
4053 server.listen()
4054 started.set()
4055 conns = []
4056 while not finish:
4057 r, w, e = select.select([server], [], [], 0.1)
4058 if server in r:
4059 # Let the socket hang around rather than having
4060 # it closed by garbage collection.
4061 conns.append(server.accept()[0])
4062 for sock in conns:
4063 sock.close()
4064
4065 t = threading.Thread(target=serve)
4066 t.start()

Callers

nothing calls this directly

Calls 8

listenMethod · 0.45
setMethod · 0.45
selectMethod · 0.45
appendMethod · 0.45
acceptMethod · 0.45
closeMethod · 0.45
sendMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected