summaryrefslogtreecommitdiff
path: root/src/options.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2011-06-23 07:57:47 +0200
committerMartin Sustrik <sustrik@250bpm.com>2011-06-23 07:57:47 +0200
commitd1373792f7888f312cd7286fdf524a0bfe124846 (patch)
tree046c7a5473b43b50be02ef34705e2a45e753c51c /src/options.hpp
parent12532c7940f23fcb3cd46208c141d47647e76231 (diff)
Outstanding requests dropped when requester dies (issue 190)
So far the requests in req/rep pattern were delivered to and processed by worker even though the original requester was dead. Thus, the worker processing replies with noone to deliver results to. This optimisation drops requests in two situations: 1. Queued inbound requests in XREP socket when peer disconnects. 2. Queued outbound requests in XREQ when socket is closed. Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
Diffstat (limited to 'src/options.hpp')
-rw-r--r--src/options.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/options.hpp b/src/options.hpp
index 858ec2e..70144b2 100644
--- a/src/options.hpp
+++ b/src/options.hpp
@@ -87,6 +87,14 @@ namespace zmq
// is not aware of the peer's identity, however, it is able to send
// messages straight away.
bool immediate_connect;
+
+ // If true, session reads all the pending messages from the pipe and
+ // sends them to the network when socket is closed.
+ bool delay_on_close;
+
+ // If true, socket reads all the messages from the pipe and delivers
+ // them to the user when the peer terminates.
+ bool delay_on_disconnect;
};
}