sockets

Siggy Brentrup bsb at winnegan.de
Sun Dec 19 03:13:02 EST 1999


"sameer chowdhury" <sameer_ at netzero.net> writes:

> Hi everyone:
> 
> The first time I connect a client and a server using sockets, it works fine,
> I then close both sockets.  But the second and subsequent times, I get the
> following error, even if I change the ports for both the client and the
> server.  Can anyone tell me what the reason could be?  I am using Win98, and
> running python 1.5.2.
> 
> Error:
> 
> Traceback (innermost last):
>   File "client_stuff.py", line 6, in ?
>     s.connect(HOST, PORT)
>   File "<string>", line 1, in connect
> socket.error: (10061, 'winsock error')

Your code works perfectly on my Linux box too, maybe you forgot to
restart the server before connecting again?

I'm attaching slightly modified versions, with te server running
continuously.

HIH
  Siggy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.py
Type: application/octet-stream
Size: 427 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19991219/4c540dc3/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.py
Type: application/octet-stream
Size: 213 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/19991219/4c540dc3/attachment-0001.obj>
-------------- next part --------------
Siggy Brentrup - bsb at winnegan.de - http://www.winnegan.de/
****** ceterum censeo javascriptum esse restrictam *******


More information about the Python-list mailing list