organise files, use same port number in examples

This commit is contained in:
2015-09-06 20:35:09 +01:00
parent 1151d6893e
commit 97613337c6
7 changed files with 10 additions and 21 deletions

View File

@@ -1,7 +1,7 @@
import socket
import select
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.bind(('', 8881))
sock.bind(('', 10000))
sock.listen(5)
# lists of sockets to watch for input and output events
@@ -34,7 +34,9 @@ try:
# a disconnect, give a message and clean up
print "disconnected from", adrs[x]
del adrs[x]
try: ous.remove(x)
try:
ins.remove(x)
ous.remove(x)
except ValueError: pass
x.close( )
for x in o: