From: Pierre Ossman Date: Tue, 2 Mar 2021 12:15:35 +0000 (+0100) Subject: Support TCP_NOPUSH as alternative to TCP_CORK X-Git-Tag: v1.11.90~64 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d6e39658ae105fca2cfe37ba736dbf0e8d8356af;p=tigervnc.git Support TCP_NOPUSH as alternative to TCP_CORK TCP_CORK is a Linux thing and BSD has TCP_NOPUSH instead. --- diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx index ed6535a8..3cd86927 100644 --- a/common/rdr/FdOutStream.cxx +++ b/common/rdr/FdOutStream.cxx @@ -74,6 +74,10 @@ void FdOutStream::cork(bool enable) int one = enable ? 1 : 0; setsockopt(fd, IPPROTO_TCP, TCP_CORK, (char *)&one, sizeof(one)); #endif +#ifdef TCP_NOPUSH + int one = enable ? 1 : 0; + setsockopt(fd, IPPROTO_TCP, TCP_NOPUSH, (char *)&one, sizeof(one)); +#endif } bool FdOutStream::flushBuffer()