|
From: | Jeff Long |
Subject: | Re: ZeroMQ Linger option |
Date: | Tue, 11 Aug 2020 06:31:44 -0400 |
Ah, thanks for clearing that up. And it looks like there's no way to manually close/reopen the socket that gets created by the flowgraph correct?CameronOn Mon, Aug 10, 2020 at 6:15 PM Jeff Long <willcode4@gmail.com> wrote:Also, time is always set to 0 for the setsockopt ZMQ_LINGER call, which would cause immediate shutdown of the socket. This is not related to timeout, which is used as the polling timeout.On Mon, Aug 10, 2020 at 7:06 PM Jeff Long <willcode4@gmail.com> wrote:At socket shutdown, LINGER determines how long close(2) or shutdown(2) will block waiting for queue messages to be sent. See man socket(7).On Mon, Aug 10, 2020 at 7:00 PM Cameron Matson <ncmatson95@gmail.com> wrote:Hi all,Can someone help me understand what's going on with any of the ZMQ Message Sink blocks? The block takes a timeout parameter which is assigned to d_timeout, but ultimately it looks like the zmq.LINGER option (which I believe is how long zmq will block before dropping the frame) is always set to a different variable, time, which is initialized in the constructor to be 0 that is used for the setsockopt call.
if (major < 3) { d_timeout = timeout * 1000; } d_context = new zmq::context_t(1); d_socket = new zmq::socket_t(*d_context, ZMQ_REP); int time = 0; d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time)); Am I missing something?Thanks,Cameron
[Prev in Thread] | Current Thread | [Next in Thread] |