]> source.dussan.org Git - tigervnc.git/commitdiff
Support TCP_NOPUSH as alternative to TCP_CORK
authorPierre Ossman <ossman@cendio.se>
Tue, 2 Mar 2021 12:15:35 +0000 (13:15 +0100)
committerPierre Ossman <ossman@cendio.se>
Tue, 2 Mar 2021 12:15:35 +0000 (13:15 +0100)
TCP_CORK is a Linux thing and BSD has TCP_NOPUSH instead.

common/rdr/FdOutStream.cxx

index ed6535a8d12b07b5c627f16b2e5dfe88fa4c1819..3cd86927eb3964f2e70e4c4b7da3030fe334451e 100644 (file)
@@ -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()