diff options
author | Gordon Sim <gsim@apache.org> | 2007-08-13 09:41:45 +0000 |
---|---|---|
committer | Gordon Sim <gsim@apache.org> | 2007-08-13 09:41:45 +0000 |
commit | f458ec7b59e6c03f59e8b33474bbe70f9a9873dc (patch) | |
tree | 5b750882fbaf54fe42ded428c76967f70ed55b3f /cpp/lib/common | |
parent | 2553b54071b2ab89faaf503e3c3c8449fed07070 (diff) | |
download | qpid-python-f458ec7b59e6c03f59e8b33474bbe70f9a9873dc.tar.gz |
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
Diffstat (limited to 'cpp/lib/common')
-rw-r--r-- | cpp/lib/common/sys/Socket.h | 1 | ||||
-rw-r--r-- | cpp/lib/common/sys/apr/Socket.cpp | 4 | ||||
-rw-r--r-- | cpp/lib/common/sys/posix/Socket.cpp | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/cpp/lib/common/sys/Socket.h b/cpp/lib/common/sys/Socket.h index d793a240c6..b5f74847c2 100644 --- a/cpp/lib/common/sys/Socket.h +++ b/cpp/lib/common/sys/Socket.h @@ -47,6 +47,7 @@ class Socket /** Set timeout for read and write */ void setTimeout(Time interval); + void setTcpNoDelay(bool on); void connect(const std::string& host, int port); diff --git a/cpp/lib/common/sys/apr/Socket.cpp b/cpp/lib/common/sys/apr/Socket.cpp index ab98c07479..c2abf50c5f 100644 --- a/cpp/lib/common/sys/apr/Socket.cpp +++ b/cpp/lib/common/sys/apr/Socket.cpp @@ -87,4 +87,8 @@ ssize_t Socket::recv(void* data, size_t size) return received; } +void Socket::setTcpNoDelay(bool on) +{ + CHECK_APR_SUCCESS(apr_socket_opt_set(socket, APR_TCP_NODELAY, on ? 1 : 0)); +} diff --git a/cpp/lib/common/sys/posix/Socket.cpp b/cpp/lib/common/sys/posix/Socket.cpp index 5bd13742f6..e27ced9161 100644 --- a/cpp/lib/common/sys/posix/Socket.cpp +++ b/cpp/lib/common/sys/posix/Socket.cpp @@ -116,3 +116,5 @@ int Socket::fd() { return socket; } + +void Socket::setTcpNoDelay(bool) {} //not yet implemented |