From 0a03e86e9547fa7c221b316a5a943467adea3dfd Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Sat, 16 Oct 2010 10:53:29 +0200 Subject: ZMQ_LINGER socket option added. 1. ZMQ_LINGER option can be set/get 2. options are part of own_t base class rather than being declared separately by individual objects 3. Linger option is propagated with "term" command so that the newest value of it is used rather than the stored old one. 4. Session sets the linger timer if needed and terminates as soon as it expires. 5. Corresponding documentation updated. Signed-off-by: Martin Sustrik --- src/xrep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xrep.cpp') diff --git a/src/xrep.cpp b/src/xrep.cpp index b0ac601..b3e8ebd 100644 --- a/src/xrep.cpp +++ b/src/xrep.cpp @@ -80,7 +80,7 @@ void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, } } -void zmq::xrep_t::process_term () +void zmq::xrep_t::process_term (int linger_) { terminating = true; @@ -93,7 +93,7 @@ void zmq::xrep_t::process_term () it++) it->second.writer->terminate (); - socket_base_t::process_term (); + socket_base_t::process_term (linger_); } void zmq::xrep_t::terminated (reader_t *pipe_) -- cgit v1.2.3