summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ConnectionHandler.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-02-02 22:28:17 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-02-02 22:28:17 +0000
commitf6f519835a049e53f13af818e26decba1fc82f3d (patch)
tree10c71151ad6d0871da35923d12c97fa2e0826c75 /cpp/src/qpid/broker/ConnectionHandler.cpp
parente5d4d995196e8a48cf7bc2180738b9bf5c3cb14f (diff)
downloadqpid-python-f6f519835a049e53f13af818e26decba1fc82f3d.tar.gz
Send client property indicating that client supports
producer throttling in the Connection.OpenOK message. Broker only tries to apply flow control to client if it has received the property in the Connection.OpenOK message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@740135 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp')
-rw-r--r--cpp/src/qpid/broker/ConnectionHandler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp
index 86123d346f..f136d61462 100644
--- a/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -45,6 +45,8 @@ const std::string PLAIN = "PLAIN";
const std::string en_US = "en_US";
const std::string QPID_FED_LINK = "qpid.fed_link";
const std::string QPID_FED_TAG = "qpid.federation_tag";
+const std::string SESSION_FLOW_CONTROL("qpid.session_flow");
+const int SESSION_FLOW_CONTROL_VER = 1;
}
void ConnectionHandler::close(connection::CloseCode code, const string& text)
@@ -139,6 +141,9 @@ void ConnectionHandler::Handler::startOk(const framing::FieldTable& clientProper
}
QPID_LOG(info, "Connection is a federation link");
}
+ if ( clientProperties.getAsInt(SESSION_FLOW_CONTROL) == SESSION_FLOW_CONTROL_VER ) {
+ connection.setClientThrottling();
+ }
}
void ConnectionHandler::Handler::secureOk(const string& response)