What is the proper way to wait for connections?
I am trying to implement a simple message passing between two applications using NetMQ (a slightly more elaborate description of what I am trying to achieve is below). After a bit of trial and error I've found that I can't just send or receive messages right away after a Connect/Bind calls, since they are non blocking and actually return even if the connection hasn't been established yet. For now I solved this with Thread.Sleep(), but this has a bad taste to it and definitely a no-go for a production system. So the question is, how's one supposed to do it in NetMQ/ZeroMQ? Client example: using