From 61ee6fae536a8000be87b5aaf271f6519a3b7d3f Mon Sep 17 00:00:00 2001 From: Martin Hurton Date: Mon, 1 Mar 2010 10:13:26 +0100 Subject: Implement flow control This commit introduces the necessary changes necessary for implementing flow control. None of the socket types implements the flow control yet. The code will crash when the flow control is enabled and the thw lwm is reached. The following commits will add flow-control support for individual socket types. --- src/command.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/command.hpp') diff --git a/src/command.hpp b/src/command.hpp index 150cad1..3d00cd7 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -40,6 +40,7 @@ namespace zmq attach, bind, revive, + reader_info, pipe_term, pipe_term_ack, term_req, @@ -84,6 +85,13 @@ namespace zmq struct { } revive; + // Sent by pipe reader to inform pipe writer + // about how many messages it has read so far. + // Used to implement the flow control. + struct { + uint64_t msgs_read; + } reader_info; + // Sent by pipe reader to pipe writer to ask it to terminate // its end of the pipe. struct { -- cgit v1.2.3