funny socket behaviour
Martin v. Loewis
martin at v.loewis.de
Thu Aug 8 03:23:16 EDT 2002
Vasisht Tadigotla <vasisht at eden.rutgers.edu> writes:
> On SunOS, IRIX and FreeBSD, an EISCONN exception is thrown, but on Linux
> it allows me to connect again to the socket after a connection has been
> established. Though I cannot read/write to the socket when I connect a
> second time, I think It should not allow a second connect. Any idea why
> this should be happening ?
I don't know why it should happen - but it does happen because that's
the way sockets are implemented on Linux. The socket module delegates
all calls to the C library (largely unmodified), which delegates all
calls to the operating system (largely unmodified).
So what you see is a specific behaviour of Linux; you might want to
ask in a Linux newsgroup whether it is a bug or a feature.
Regards,
Martin
More information about the Python-list
mailing list