in reply to Re: UDP Client Multiple servers
in thread UDP Client Multiple servers
I found the answer to my problem. I needed to eval whether a response was received in an amount of time and escape out if not.
eval { local $SIG{ALRM} = sub { die 'Timed Out'; }; alarm 1; #receive response $handle->recv($newmsg, 1024) or die; $packet = Net::DHCP::Packet->new($newmsg); $data = $packet->toString(); close $handle; alarm 0; }; close $handle;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: UDP Client Multiple servers
by zwon (Abbot) on Oct 12, 2012 at 06:30 UTC | |
by brap (Pilgrim) on Oct 12, 2012 at 13:18 UTC | |
by zwon (Abbot) on Oct 12, 2012 at 14:26 UTC | |
by brap (Pilgrim) on Oct 12, 2012 at 14:45 UTC |