closing a socket
Keith Murphy
kpmurphy at my-deja.com
Thu Jul 20 10:34:34 EDT 2000
is closing sockets tricky? or am i doing something wrong... shouldn't
this work?
-- userlist contains a bunch of users and their connections
...
s = socket(AF_INET, SOCK_STREAM)
s.bind('', 5555)
s.listen(1)
...
for u in userlist:
print u.conn
u.conn.close()
print u.conn
s.close()
# EOF
however, i get the following error if i try and run it a second time:
socket.error: (125, 'Address already in use')
help! :)
-->keith
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list