diff options
Diffstat (limited to 'common/rdr/FdOutStream.cxx')
-rw-r--r-- | common/rdr/FdOutStream.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx index d7da7103..3405838d 100644 --- a/common/rdr/FdOutStream.cxx +++ b/common/rdr/FdOutStream.cxx @@ -77,6 +77,16 @@ unsigned FdOutStream::getIdleTime() return rfb::msSince(&lastWrite); } +void FdOutStream::cork(bool enable) +{ + BufferedOutStream::cork(enable); + +#ifdef TCP_CORK + int one = enable ? 1 : 0; + setsockopt(fd, IPPROTO_TCP, TCP_CORK, (char *)&one, sizeof(one)); +#endif +} + bool FdOutStream::flushBuffer(bool wait) { size_t n = writeWithTimeout((const void*) sentUpTo, |