[zeromq-dev] Socket connect status

Martin Sustrik sustrik at 250bpm.com
Mon Mar 15 13:34:58 CET 2010

Diablo 666 wrote:
> Hi,
>  > Well, such semantics would lead to deadlock in sender in case the
>  > receiver is not available.
> okay, I see the problem in "wait until message is delivered".
> What about a message returning the status of a message {IN_QUEUE, SENT,
> ERROR}?  As I only need to send a single message in the normal case, I could
> close the socket as soon as the message is in the state SENT or ERROR.

You would exit if the message is queued? The queue is local to the 
process, thus it'll just go away.

Anyway, the problem we are discussing here is whether there exists sync 
API for 0MQ. One that handles at most 1 TCP connection, implements no 
queueing, and is able to connect but not to bind, returns TCP errors 
directly to the user.

There's no such API. However, given the constraints above why not use 
BSD socket instead? It looks like a perfect match.


More information about the zeromq-dev mailing list