UDP does not block after the packet has hit the wire, or because of anything going on beyond the local system. The sendto() system call, however, can block due to things within the local network stack (such as buffers), even for SOCK_DGRAM sockets, unless either the socket or the individual call is set non-blocking. In this case, we have a fully configured Ethernet interface that is operationally down (I interpret the OP's description as 2 Pis directly connected by Ethernet, so the interface state changes when the remote Pi is down), so there's a good chance that it's blocking on something like ARP or interface buffers.UDP does not block. It is probably a completely different soket as the one in the example.
Statistics: Posted by Murph9000 — Wed Aug 28, 2024 6:54 pm