UDP listener and server written in C that does not hang after sending a message like netcat does