examples from [1] [1] http://tim.dysinger.net/posts/2013-09-16-getting-started-with-nanomsg.html