diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-02-03 19:09:06 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-02-03 19:09:06 +0900 |
| commit | 98e7018599c010b56ade294942e2e7b3d58d1bb6 (patch) | |
| tree | 21278fcd6703169e43d62d25f86d3d5cd8958de7 /src/SocketCore.h | |
| parent | 1c9cfccac4bdd16b8c6662eab9e58d6f517424d0 (diff) | |
Fix failure to set TCP_NODELAY on Windows
On Windows setting TCP_NODELAY after non-blocking connect fails
at least on Windows 7.
Diffstat (limited to 'src/SocketCore.h')
| -rw-r--r-- | src/SocketCore.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SocketCore.h b/src/SocketCore.h index 4b04c3fb..f673657e 100644 --- a/src/SocketCore.h +++ b/src/SocketCore.h @@ -207,8 +207,10 @@ public: * the connection is established. * @param host hostname or ip address to connect to * @param port service port number to connect to + * @param tcpNodelay true to disable Nagle algorithm */ - void establishConnection(const std::string& host, uint16_t port); + void establishConnection(const std::string& host, uint16_t port, + bool tcpNodelay = true); void setNonBlockingMode(); |
