]> source.dussan.org Git - tigervnc.git/commitdiff
Emulate corking when TCP_CORK is missing
authorPierre Ossman <ossman@cendio.se>
Wed, 28 Jun 2023 14:03:30 +0000 (16:03 +0200)
committerPierre Ossman <ossman@cendio.se>
Wed, 28 Jun 2023 14:03:30 +0000 (16:03 +0200)
If we can't rely on the OS to handle corking for us, then we need to
enable our own handling of it.

common/rdr/FdOutStream.cxx

index e630a4d770b65216ec0e31251b3469a1c073e614..6867772653821b1776ebbff25897c10f6eda9f79 100644 (file)
 using namespace rdr;
 
 FdOutStream::FdOutStream(int fd_)
-  : BufferedOutStream(false), fd(fd_)
+#ifdef TCP_CORK
+  : BufferedOutStream(false),
+#else
+  : BufferedOutStream(true),
+#endif
+  fd(fd_)
 {
   gettimeofday(&lastWrite, NULL);
 }