[zeromq-dev] equivalent of accept

Varol Okan varokan at movingsatellites.com
Sun Apr 25 20:54:24 CEST 2010


Martin Sustrik wrote:
> Varol Okan wrote:
>
>   
>>> I think there's a conceptual gap here. 0MQ is not connection based,
>>> it's message based. Forget about connections. There are none -- at
>>> least from user's point of view. Instead, there are messages.
>>>
>>> In your case it means there's no way to authenticate a connection.
>>> You have to authenticate a message.
>>>       
>> Hahaha, I feel like I was sitting in a dark room until some one
>> turned on the light :) Sorry for that, as I said I am starting out
>> with 0MQ.
>>     
>
> :)
>
>   
>> Anyhow, one last question remains wrt to the client. Since 0MQ is
>> message based, how can I determine if the host is alive or simply
>> busy doing things.
>>
>> Example: for a socket of type  zmq::socket_t socket ( ctx, ZMQ_REQ );
>>
>>
>> If I do socket.send ( query ); followed by socket.recv ( &result );
>>
>> How do I handle a fault like server crashed, or some one pulled the
>> plug. Is there a timeout I can set or would the client freeze ? What
>> can I do to gracefully handle these types of fault ?
>>     
>
> If a service crashes, 0MQ will remove it from it's load-balancing 
> mechanism. Thus messages will be sent to other service instances. If 
> there are no other instances, messages will be queued and sent to the 
> service once it is restarted.
>
> Martin
>   
I see,

Is there a plan to add some type of timeout to at least the recv() call
? From where I stand that would make sense. Otherwise I would have to
either come up with a timeout mechanism myself or implement a keepalive
message between client/server ( though I never liked keepalive's ).

Varol :)
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>   




More information about the zeromq-dev mailing list