Basic infrastructure to support fences.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4798 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/CConnection.cxx b/common/rfb/CConnection.cxx
index 04e3439..f2f19ca 100644
--- a/common/rfb/CConnection.cxx
+++ b/common/rfb/CConnection.cxx
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <string.h>
#include <rfb/Exception.h>
+#include <rfb/fenceTypes.h>
#include <rfb/CMsgReaderV3.h>
#include <rfb/CMsgWriterV3.h>
#include <rfb/CSecurity.h>
@@ -269,3 +270,16 @@
state_ = RFBSTATE_NORMAL;
vlog.debug("initialisation done");
}
+
+void CConnection::fence(rdr::U32 flags, unsigned len, const char data[])
+{
+ CMsgHandler::fence(flags, len, data);
+
+ if (!(flags & fenceFlagRequest))
+ return;
+
+ // We cannot guarantee any synchronisation at this level
+ flags = 0;
+
+ writer()->writeFence(flags, len, data);
+}