usando um tempo limite de zero (0)
"Servidor":
nc -kluvw 0 localhost 9000
"Cliente":
echo -e "all" | nc -vuw 0 localhost 9000
echo -e "the" | nc -vuw 0 localhost 9000
echo -e "udp" | nc -vuw 0 localhost 9000
echo -e "packets" | nc -vuw 0 localhost 9000
Resultado:
Connection from 127.0.0.1 port 9000 [udp/*] accepted
all
Connection from 127.0.0.1 port 9000 [udp/*] accepted
the
Connection from 127.0.0.1 port 9000 [udp/*] accepted
udp
Connection from 127.0.0.1 port 9000 [udp/*] accepted
packets
testado com:
uname -a
Linux ubuntu 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC 2012 i686 i686 i386 GNU/Linux