Hello all,

I am trying to read from a socket connection, a text string if any. Problem is, the text string does not end with a CR. Socket connection is ok. Below is my code snippet:
...
my $buffer;
$sock->blocking(0);
while (my $count = $sock->read($buffer,512))
{
   print "$buffer";
}

The result is that the code hangs forever. Nothing is printed. Is there any way for me to read the socket buffer without blocking, or is my code missing something?

Thanks.
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to