socket.recvfrom() & sendto()

Fredrik Lundh fredrik at pythonware.com
Thu May 10 15:53:48 EDT 2001


Donn Cave wrote:
> On that platform's currently somewhat less than industrial strength
> socket implementation, the "non-blocking connect has completed"
> state makes the socket "readable" from select's point of view.
> That may well be bug, I don't know.   At worst, it's a pretty
> obscure matter

well, the Unix specification is clear on what an asynchronous
connect is supposed to do:

    "When the connection has been established asynchronously,
    select() and poll() will indicate that the file descriptor for the
    socket is ready for writing.

looks like a BeOS bug...

> I haven't had a chance to run test_asynchat on a UNIX platform, but it
> looks to me like the client doesn't handle the non-blocking connect
> properly anyway - I don't see where it does the second connect.

what second connect?  you only have to call it once; it'll return
an EINPROGRESS error, and make the socket writable when it's
done.

Cheers /F





More information about the Python-list mailing list