[zeromq-dev] Smallest 0MQ stack ever

Pieter Hintjens ph at imatix.com
Fri May 6 10:40:33 CEST 2011


Hi,

Just wanted to share Daniel Lundin's 1-line Bash implementation of 0MQ:

zmq_push () { m=$(cat) && echo -e $(printf '\\x01\\x00\\x%02x\\x00%s'
$((1 + ${#m})) "$m") | nc -q1 $@; }

-Pieter



More information about the zeromq-dev mailing list