Skip Menu |

This queue is for tickets about the POE CPAN distribution.

Report information
The Basics
Id: 11938
Status: resolved
Priority: 0/
Queue: POE

People
Owner: Nobody in particular
Requestors: troc [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



From: Rocco Caputo <dngor [...] bellsouth.net>
To: bug-poe [...] rt.cpan.org
Subject: Work-around for non-blocking connect() issues in ActivePerl?
Date: Sat, 19 Mar 2005 01:32:43 -0500
Something to investigate: From: Ed W <norealaddress@nowhere.com> Newsgroups: comp.lang.perl.misc Subject: Re: Non-blocking socket connect examples on win32 not working Rocco Caputo wrote: Show quoted text
> On Fri, 18 Mar 2005 00:36:40 GMT, Ed W wrote: >
>>OK, yes I know this is practically an FAQ, but I can't get the win32 >>non-blocking socket examples to work on Perl 5.8 on Win XP. >> >>See below for my example program. Seems to me that this should show a >>connect time of near zero seconds. However, it actually takes a time >>roughly the same as the ping time to the server, indicating to me that >>it's blocking until connected...
> > > Check ActiveState's bug tracker. This issue has come up several times > and been written off as one of Windows' little quirks. You could try > Cygwin perl instead... >
Actually, almost by chance I discovered that the last param to the ioctl has to be a reference param... Changing the code as follows makes it work: my $nonblocking = $blocking ? 0 : 1; ioctl($self, 0x8004667e, \$nonblocking); I have not seen this explicitly described anywhere, so hopefully it is useful to someone else if it turns up on a search... I still don't understand why such a trivial workaround is not part of INET.pm after all this time though? Seems to be a trivial patch? Thanks all Ed W