Move socket write event handling in to the RFB core
What to do when a socket is writeable should be handled in the
RFB core code as there may be other events we want to fire off
when this happens.
diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx
index 932f579..0f4ca94 100644
--- a/common/rfb/VNCSConnectionST.cxx
+++ b/common/rfb/VNCSConnectionST.cxx
@@ -190,6 +190,17 @@
}
}
+void VNCSConnectionST::flushSocket()
+{
+ if (state() == RFBSTATE_CLOSING) return;
+ try {
+ setSocketTimeouts();
+ sock->outStream().flush();
+ } catch (rdr::Exception &e) {
+ close(e.str());
+ }
+}
+
void VNCSConnectionST::pixelBufferChange()
{
try {