I have created a socket like this in perl in a daemon
IO::Socket::INET->new(LocalPort => $port,
Proto => 'udp',Blocking => '0') or die "socket: $@";
on a Linux machine
The socket behaves like non blocking socket as expected during a recv call as expected
$sock->recv($message, 128);
.
However, I am consistently observing that when the VIFs on eth0 are reconfigured while the daemon is running and receiving data, then the recv call starts blocking.
This is a very perplexing issue. I did $sock->recv($message, 128, MSG_DONTWAIT);
and the recv call becomes non blocking.
I have googled but could not see what is the suggested way for using UDP non blocking sockets.