I'm using a Garmin GPS system to stream data to my computer through a UDP stream. The script I have runs fine when the device is attached and enabled, but when it isn't, the script merely continuously checks for the UDP data rather than realizing that it isn't sending any data. If this were TCP, it would be simple enough to determine a connection, but...eh.
use IO::Socket::INET;
my $MySocket = IO::Socket::INET -> new(LocalPort=>3944, Proto=>'udp');
That's my current setup, but I'd like to figure out some form of error checking that would allow the program to run regardless of the UDP connection.
Thanks.
use IO::Socket::INET;
my $MySocket = IO::Socket::INET -> new(LocalPort=>3944, Proto=>'udp');
That's my current setup, but I'd like to figure out some form of error checking that would allow the program to run regardless of the UDP connection.
Thanks.