On 19 Jul 2013, at 5:52 am, Justin Karneges <[email protected]> wrote:
> Hi,
>
> I have a couple of concerns about using REQ.
>
> 1) In order to implement timeouts (which I'd think nearly every
> application should need), I use the following strategy:
> a) If I cannot write to the socket after enough time has passed, then
> I consider the request to have failed and I leave the socket in its
> current state.
> b) If I cannot read the response from the socket after enough time
> has passed, then I consider the request to have failed and I close and
> recreate the socket. I believe this socket resetting to be necessary so
> that the REQ state machine is willing to take writes again.
>
> Does this seem like the right way to go about timeouts?
Great questions. I was wondering the same thing. To add another question in
here:
What is the correct way to handle the timeout?
If the REQ socket is in the receive state, the only way it seems to me is to
close the socket and make a new socket with a new connection. Is that right?
-Matt.
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev