Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I found this lovely gem on this site and it's worked well. My first thought to solve my problem was to make my socket non-blocking with ioctl, read from it, then change it back to blocking with a similar ioctl call. Unfortunately, this doesn't work. I tried setting $true to 0, -1, and undef and all have the same effect, they make the socket non-blocking. So my question is this: Is there any way to reverse the non-blockingness caused by an ioctl call? I have tried other methods (like an alarm), but these don't work in Windows. When perl is blocked in a sysread, I can't get it to catch sig int or sig alrm. Please help!my $true = 1; ioctl($sock,0x8004667e,\$true);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ioctl for non-blocking and blocking in Windows
by bart (Canon) on Apr 16, 2007 at 11:11 UTC | |
by Anonymous Monk on Apr 16, 2007 at 17:36 UTC | |
|
Re: ioctl for non-blocking and blocking in Windows
by Anonymous Monk on Apr 16, 2007 at 17:54 UTC |