[Tutor] Python and sockets

Nick Lunt nick at javacat.f2s.com
Tue Aug 17 14:57:30 CEST 2004


Theres a book out soon about python socket programming,
http://www.compman.co.uk/cgi-win/browse.exe?ref=658967

Also, I find www.twistedmatrix.com much more useful for network programs,
and Im still a python beginner.

Depends what you want to do though I suppose ;)

Regarding your problem, it'd probably be best if you could post some of the
offending code ;)

Nick.


-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org]On
Behalf Of cecilwesterhof at xs4all.nl
Sent: 17 August 2004 13:44
To: tutor at python.org
Subject: [Tutor] Python and sockets


I started with python and also with sockets. I wrote a little program to
start using sockets. In principle it works okay. There are only two
problems:

- When I open a socket and it is refused by the server, I just get a
socket back, without a signal that the server refused the connection. What
do I need to do, to see that the connection is refused?

- When I close a socket that has no data waiting, everything works fine.
But when I close a socket that still has data to be read. The socket is
closed, but the server never sees that it is closed. I tried using
shutdown, but this did not change anything. What do I need to do, so that
the server sees the close?

Does anybody have a good resource for python and sockets?



_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list