develooper Front page | perl.perl5.porters | Postings from August 2001

Re: windows nt/2000 breaks non-blocking sockets

Thread Previous | Thread Next
Gurusamy Sarathy
August 17, 2001 15:48
Re: windows nt/2000 breaks non-blocking sockets
Message ID:
On Fri, 17 Aug 2001 17:39:58 EDT, Rocco Caputo wrote:
>Non-blocking connect() calls on Windows 2000/NT systems return error
>10022 (invalid argument) despite the parameters being fine.
>Newer versions of Windows need WSA_FLAG_OVERLAPPED to be set at the
>time sockets are created, otherwise the sockets can't be made
>non-blocking later.  Previous versions of Windows don't require the
>flag, so non-blocking sockets work there.

This is not really obvious to me.

Perl uses socket() (not WSASocket()) to create sockets on Windows.
This page claims that socket() already sets the overlapped bit:

And the URL you have given above doesn't contradict that.

Can you show me a self-contained example of the perl code that works
on wNT but not on w2000?



Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About