aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-06-28 16:03:30 +0200
committerPierre Ossman <ossman@cendio.se>2023-06-28 16:03:30 +0200
commit7b3fe6d283f917bff99a60e2bdc59c98c82b1dfa (patch)
tree97af239b3571428917b82da915e505c4be654fac
parentb0319e3e09b9d5e741a78e0591d730ef577c6ecb (diff)
downloadtigervnc-7b3fe6d283f917bff99a60e2bdc59c98c82b1dfa.tar.gz
tigervnc-7b3fe6d283f917bff99a60e2bdc59c98c82b1dfa.zip
Emulate corking when TCP_CORK is missing
If we can't rely on the OS to handle corking for us, then we need to enable our own handling of it.
-rw-r--r--common/rdr/FdOutStream.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/rdr/FdOutStream.cxx b/common/rdr/FdOutStream.cxx
index e630a4d7..68677726 100644
--- a/common/rdr/FdOutStream.cxx
+++ b/common/rdr/FdOutStream.cxx
@@ -52,7 +52,12 @@
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);
}