This example comes from perldoc -f fcntl:
REMOTE there is the socket handle. You may need to dereference if you have a lexical handle ( *{$sock) ).use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK); $flags = fcntl(REMOTE, F_GETFL, 0) or die "Can't get flags for the socket: $!\n"; $flags = fcntl(REMOTE, F_SETFL, $flags | O_NONBLOCK) or die "Can't set flags for the socket: $!\n";
After Compline,
Zaxo
In reply to Re: unblocking sockets
by Zaxo
in thread unblocking sockets
by pmg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |