From f458ec7b59e6c03f59e8b33474bbe70f9a9873dc Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 13 Aug 2007 09:41:45 +0000 Subject: Fixes for QPID-544 and QPID-548 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@565284 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/client/Connection.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'cpp/lib/client/Connection.cpp') diff --git a/cpp/lib/client/Connection.cpp b/cpp/lib/client/Connection.cpp index f7897aa4df..c00b58a4a9 100644 --- a/cpp/lib/client/Connection.cpp +++ b/cpp/lib/client/Connection.cpp @@ -35,7 +35,8 @@ Connection::Connection( bool _debug, u_int32_t _max_frame_size, qpid::framing:: channelIdCounter(0), max_frame_size(_max_frame_size), closed(true), - version(_version->getMajor(),_version->getMinor()) + version(_version->getMajor(),_version->getMinor()), + tcpNoDelay(false) { connector = new Connector(version, debug, _max_frame_size); } @@ -44,6 +45,10 @@ Connection::~Connection(){ delete connector; } +void Connection::setTcpNoDelay(bool on) { + tcpNoDelay = on; +} + void Connection::open(const std::string& _host, int _port, const std::string& uid, const std::string& pwd, const std::string& virtualhost){ host = _host; port = _port; @@ -51,7 +56,7 @@ void Connection::open(const std::string& _host, int _port, const std::string& ui connector->setTimeoutHandler(this); connector->setShutdownHandler(this); out = connector->getOutputHandler(); - connector->connect(host, port); + connector->connect(host, port, tcpNoDelay); ProtocolInitiation* header = new ProtocolInitiation(version); responses.expect(); -- cgit v1.2.1