commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 30/46: zeromq: set ZMQ_LINGER to 0 for all


From: git
Subject: [Commit-gnuradio] [gnuradio] 30/46: zeromq: set ZMQ_LINGER to 0 for all blocks
Date: Fri, 16 May 2014 19:37:15 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

jcorgan pushed a commit to branch master
in repository gnuradio.

commit a4e6a803f34b349f051a3ff2bd3cf5b2140cfbab
Author: Johnathan Corgan <address@hidden>
Date:   Wed May 7 13:59:02 2014 -0700

    zeromq: set ZMQ_LINGER to 0 for all blocks
---
 gr-zeromq/lib/pub_sink_impl.cc    | 2 ++
 gr-zeromq/lib/pull_source_impl.cc | 2 ++
 gr-zeromq/lib/push_sink_impl.cc   | 2 ++
 gr-zeromq/lib/rep_sink_impl.cc    | 2 ++
 gr-zeromq/lib/req_source_impl.cc  | 2 ++
 5 files changed, 10 insertions(+)

diff --git a/gr-zeromq/lib/pub_sink_impl.cc b/gr-zeromq/lib/pub_sink_impl.cc
index 0700239..9cd115d 100644
--- a/gr-zeromq/lib/pub_sink_impl.cc
+++ b/gr-zeromq/lib/pub_sink_impl.cc
@@ -45,6 +45,8 @@ namespace gr {
     {
       d_context = new zmq::context_t(1);
       d_socket = new zmq::socket_t(*d_context, ZMQ_PUB);
+      int time = 0;
+      d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
       d_socket->bind(address);
     }
 
diff --git a/gr-zeromq/lib/pull_source_impl.cc 
b/gr-zeromq/lib/pull_source_impl.cc
index 8d90b0e..2498eee 100644
--- a/gr-zeromq/lib/pull_source_impl.cc
+++ b/gr-zeromq/lib/pull_source_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
       d_timeout = timeout >= 0 ? (int)(timeout*1e6) : 0;
       d_context = new zmq::context_t(1);
       d_socket = new zmq::socket_t(*d_context, ZMQ_PULL);
+      int time = 0;
+      d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
       d_socket->connect (address);
     }
 
diff --git a/gr-zeromq/lib/push_sink_impl.cc b/gr-zeromq/lib/push_sink_impl.cc
index 11a4967..5acc3c5 100644
--- a/gr-zeromq/lib/push_sink_impl.cc
+++ b/gr-zeromq/lib/push_sink_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
       d_blocking = blocking;
       d_context = new zmq::context_t(1);
       d_socket = new zmq::socket_t(*d_context, ZMQ_PUSH);
+      int time = 0;
+      d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
       d_socket->bind (address);
     }
 
diff --git a/gr-zeromq/lib/rep_sink_impl.cc b/gr-zeromq/lib/rep_sink_impl.cc
index 7e5f43d..d3d8f81 100644
--- a/gr-zeromq/lib/rep_sink_impl.cc
+++ b/gr-zeromq/lib/rep_sink_impl.cc
@@ -46,6 +46,8 @@ namespace gr {
       d_timeout = timeout >= 0 ? (int)(timeout*1e6) : 0;
       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));
       d_socket->bind (address);
     }
 
diff --git a/gr-zeromq/lib/req_source_impl.cc b/gr-zeromq/lib/req_source_impl.cc
index 8dedf6c..937b594 100644
--- a/gr-zeromq/lib/req_source_impl.cc
+++ b/gr-zeromq/lib/req_source_impl.cc
@@ -45,6 +45,8 @@ namespace gr {
     {
       d_context = new zmq::context_t(1);
       d_socket = new zmq::socket_t(*d_context, ZMQ_REQ);
+      int time = 0;
+      d_socket->setsockopt(ZMQ_LINGER, &time, sizeof(time));
       d_socket->connect (address);
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]