client derived from async_chat
heikowu at ceosg.de
Mon Aug 18 01:26:33 CEST 2003
On Mon, 2003-08-18 at 00:30, Patrick Useldinger wrote:
> > socket.error: (10035, 'The socket operation could not complete without
> > blocking')
>From what I read, this is obvious: Windows is telling you, that the
(still-connecting) socket you created is set to non-blocking, but still
you try to receive data from it, so this means that the operation would
have to block until the socket is finally connected (or fails to
Remember: connecting is also a non-blocking operation, if the socket is
set to non-blocking mode.
I even think that exactly this error is telling you (IIRC from reading
the UNIX socket docs) that the connection is still in progress; when the
socket later returns some other exception, this means that the socket
could not be established, when read() returns something for the first
time, the socket has been established.
I dunno why async_chat doesn't work with this on Windows (on *nix, this
is exactly what it does), but I guess it has something to do with
decoding the error codes, as a *nix-socket would return EWOULDBLOCK in
this case, for which it checks, I am certain of that.
If you need more info on this, feel free to mail me privately.
More information about the Python-list