summaryrefslogtreecommitdiff
path: root/src/socket_base.hpp
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@fastmq.commkdir>2009-11-21 20:59:55 +0100
committerMartin Sustrik <sustrik@fastmq.commkdir>2009-11-21 20:59:55 +0100
commit0e9ab2e8a3f5bc22f2c331c14236a2918a5512a8 (patch)
treec91f1e131a4a84a374c466f147958c5971f36ad7 /src/socket_base.hpp
parent14f2fecdcd9732fe741c211138a4ba327816a937 (diff)
inproc transport - initial commit
Diffstat (limited to 'src/socket_base.hpp')
-rw-r--r--src/socket_base.hpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/socket_base.hpp b/src/socket_base.hpp
index 49ff5a5..b6df8c4 100644
--- a/src/socket_base.hpp
+++ b/src/socket_base.hpp
@@ -33,6 +33,7 @@
#include "mutex.hpp"
#include "options.hpp"
#include "stdint.hpp"
+#include "atomic_counter.hpp"
namespace zmq
{
@@ -54,6 +55,11 @@ namespace zmq
int recv (zmq_msg_t *msg_, int flags_);
int close ();
+ // When another owned object wants to send command to this object
+ // it calls this function to let it know it should not shut down
+ // before the command is delivered.
+ void inc_seqnum ();
+
// This function is used by the polling mechanism to determine
// whether the socket belongs to the application thread the poll
// is called from.
@@ -132,6 +138,12 @@ namespace zmq
// started.
bool shutting_down;
+ // Sequence number of the last command sent to this object.
+ atomic_counter_t sent_seqnum;
+
+ // Sequence number of the last command processed by this object.
+ uint64_t processed_seqnum;
+
// List of existing sessions. This list is never referenced from within
// the socket, instead it is used by I/O objects owned by the session.
// As those objects can live in different threads, the access is