Commit ed1de050 authored by Denis Bilenko's avatar Denis Bilenko

fix echoserver.py not to use deprecated API

parent 2e6b35dc
......@@ -44,7 +44,9 @@ def handle_socket(f):
if __name__ == '__main__':
print "server socket listening on port 6000"
server = socket.tcp_listener(('0.0.0.0', 6000))
server = socket.socket()
server.bind(('0.0.0.0', 6000))
server.listen(5)
while True:
try:
new_sock, address = server.accept()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment