Hi,
I have a Problem with blocking INET reading. I created a socket and wait till a client connect to it. But no matter what I do, whenever I try to read from the socket, it blocks. I tried $Client->blocking(0), but it seems to have no effect. I tested it under Win2000 with Perl 5.6.1. Does anyone kown how I can solve this problem?
Code:
$Socket = IO::Socket::INET->new(
LocalPort => '25022',
Proto => 'tcp',
Listen => 10,
Timeout => 1,
Type => SOCK_STREAM,
Reuse => 1
) or die $!;
until($Client = $Socket->accept()) {}
$Client->blocking(0);
# The next statment shouldnt block, but it does !!!
$Input = <$Client>;
$Client->blocking(1);
Later in the program I need the blocking. Has this anything to do with Perl or Windows Version, I have problems with sockets under Win NT 4.0 too, but on the Client side ( but this is another story ).
Andre