MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / echo_server

Function echo_server

src/11/simple_authentication_of_clients/server.py:16–22  ·  view source on GitHub ↗
(address)

Source from the content-addressed store, hash-verified

14 client_sock.sendall(msg)
15
16def echo_server(address):
17 s = socket(AF_INET, SOCK_STREAM)
18 s.bind(address)
19 s.listen(5)
20 while True:
21 c,a = s.accept()
22 echo_handler(c)
23
24print('Echo server running on port 18000')
25

Callers 1

server.pyFile · 0.70

Calls 2

acceptMethod · 0.80
echo_handlerFunction · 0.70

Tested by

no test coverage detected