I am using the following script
$sock = new IO::Socket::INET ( PeerAddr => $$display{'dp_ipaddress' +}, PeerPort => $$display{'dp_tcpport'}, Proto => 'tcp', Blocking => 1, Timeout => 3, ); # blah blah constructing $msg $sock->send($msg); $resp = <$sock>;
My problem....
The script is getting stuck at '$resp = <$sock>;'
My application, I am sending a message to an electronic display with a microcontroller, which should respond with an ACK (0x6), a NACK (0x15) or no response at all if the display is dead or cable is broken.
I use the response to update a database to indicate to user which displays are working. I have to iterate through many displays and I don't want to get stock at the first non-responding one.
Any ideas on how to get past this problem. I have tried the various eval...die suggestions and select options but none works. I am developing on Windows but product will be deployed on Linux.
In reply to Getting stuck reading from a socket by punungwe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |