diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-10-16 10:53:29 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-10-16 10:53:29 +0200 |
commit | 0a03e86e9547fa7c221b316a5a943467adea3dfd (patch) | |
tree | f47b0cd7d3c91c59de419506f8d66c27e327e41c /src/socket_base.cpp | |
parent | a1474e305762d32df2b79300d124aac7fa0181c8 (diff) |
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 <sustrik@250bpm.com>
Diffstat (limited to 'src/socket_base.cpp')
-rw-r--r-- | src/socket_base.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 2293701..c1d210d 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -681,7 +681,7 @@ void zmq::socket_base_t::process_unplug () { } -void zmq::socket_base_t::process_term () +void zmq::socket_base_t::process_term (int linger_) { // Unregister all inproc endpoints associated with this socket. // Doing this we make sure that no new pipes from other sockets (inproc) @@ -689,7 +689,7 @@ void zmq::socket_base_t::process_term () unregister_endpoints (this); // Continue the termination process immediately. - own_t::process_term (); + own_t::process_term (linger_); } void zmq::socket_base_t::process_destroy () |