make netcat listen for multiple UDP packets
using a timeout of zero (0)
"Server":
nc -kluvw 0 localhost 9000
"Client":
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
Result:
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
tested with:
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