Use tcpdump or strace to see whether the packets are not being sent by the host, are being sent by the host but not received by the client, or are being received by the client but not sent to your program. That should point you in the right direction for finding a solution.