diff options
author | Constantin Kaplinsky <const@tightvnc.com> | 2008-06-05 12:34:59 +0000 |
---|---|---|
committer | Constantin Kaplinsky <const@tightvnc.com> | 2008-06-05 12:34:59 +0000 |
commit | a77e818d9b4db8794b7a051118a0542de660a857 (patch) | |
tree | 5b065169be59eee819557cf6357beb1ccd79f236 /common/rfb | |
parent | 67ebf00acc436b3bd8bcd9615d8b8610b91b0f09 (diff) | |
download | tigervnc-a77e818d9b4db8794b7a051118a0542de660a857.tar.gz tigervnc-a77e818d9b4db8794b7a051118a0542de660a857.zip |
Removed support for continuous updates, a TightVNC-specific RFB protocol
extension. That extension used to send framebuffer updates continuously, not
waiting for clients' requests. However, it showed bad results with
low-bandwidth connections, due to lack of proper data flow control.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2581 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb')
-rw-r--r-- | common/rfb/SConnection.cxx | 7 | ||||
-rw-r--r-- | common/rfb/SMsgHandler.cxx | 8 | ||||
-rw-r--r-- | common/rfb/SMsgHandler.h | 3 | ||||
-rw-r--r-- | common/rfb/SMsgReader.cxx | 14 | ||||
-rw-r--r-- | common/rfb/SMsgReader.h | 1 | ||||
-rw-r--r-- | common/rfb/SMsgReaderV3.cxx | 1 | ||||
-rw-r--r-- | common/rfb/VNCSConnectionST.cxx | 39 | ||||
-rw-r--r-- | common/rfb/VNCSConnectionST.h | 8 |
8 files changed, 0 insertions, 81 deletions
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index 2fde9fbb..a61627ca 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -445,11 +445,6 @@ void SConnection::sendInteractionCaps() scaps.addTightExt(msgTypeFileLastRequestFailed, "FTS_RQFL"); */ - // Continuous updates: - /* FIXME: EndOfContinuousUpdates message is not supported yet: - scaps.addTightExt(msgTypeEndOfContinuousUpdates, "CUS_EOCU"); - */ - // // Advertise support for non-standard client-to-server messages // @@ -470,8 +465,6 @@ void SConnection::sendInteractionCaps() ccaps.addTightExt(msgTypeFileDeleteRequest, "FTC_RMRQ"); */ - ccaps.addTightExt(msgTypeEnableContinuousUpdates, "CUC_ENCU"); - if (m_videoSelectionEnabled) { ccaps.addTightExt(msgTypeVideoRectangleSelection, "VRECTSEL"); } diff --git a/common/rfb/SMsgHandler.cxx b/common/rfb/SMsgHandler.cxx index f18a0489..ccc97ad0 100644 --- a/common/rfb/SMsgHandler.cxx +++ b/common/rfb/SMsgHandler.cxx @@ -50,11 +50,3 @@ void SMsgHandler::framebufferUpdateRequest(const Rect& r, bool incremental) void SMsgHandler::supportsLocalCursor() { } - -void SMsgHandler::enableContinuousUpdates(const Rect& r) -{ -} - -void SMsgHandler::disableContinuousUpdates() -{ -} diff --git a/common/rfb/SMsgHandler.h b/common/rfb/SMsgHandler.h index ff742465..cf3377d5 100644 --- a/common/rfb/SMsgHandler.h +++ b/common/rfb/SMsgHandler.h @@ -47,9 +47,6 @@ namespace rfb { virtual void setEncodings(int nEncodings, rdr::U32* encodings); virtual void framebufferUpdateRequest(const Rect& r, bool incremental); - virtual void enableContinuousUpdates(const Rect& r); - virtual void disableContinuousUpdates(); - // InputHandler interface // The InputHandler methods will be called for the corresponding messages. diff --git a/common/rfb/SMsgReader.cxx b/common/rfb/SMsgReader.cxx index 0f5758b0..cdca1b9b 100644 --- a/common/rfb/SMsgReader.cxx +++ b/common/rfb/SMsgReader.cxx @@ -99,20 +99,6 @@ void SMsgReader::readClientCutText() handler->clientCutText(ca.buf, len); } -void SMsgReader::readEnableContinuousUpdates() -{ - bool enable = is->readU8(); - int x = is->readU16(); - int y = is->readU16(); - int w = is->readU16(); - int h = is->readU16(); - if (enable) { - handler->enableContinuousUpdates(Rect(x, y, x+w, y+h)); - } else { - handler->disableContinuousUpdates(); - } -} - void SMsgReader::readVideoRectangleSelection() { (void)is->readU8(); diff --git a/common/rfb/SMsgReader.h b/common/rfb/SMsgReader.h index 997c07bf..145c747a 100644 --- a/common/rfb/SMsgReader.h +++ b/common/rfb/SMsgReader.h @@ -48,7 +48,6 @@ namespace rfb { virtual void readClientCutText(); // Read TightVNC-specific protocol messages. - virtual void readEnableContinuousUpdates(); virtual void readVideoRectangleSelection(); SMsgReader(SMsgHandler* handler, rdr::InStream* is); diff --git a/common/rfb/SMsgReaderV3.cxx b/common/rfb/SMsgReaderV3.cxx index 468d74a0..37070a86 100644 --- a/common/rfb/SMsgReaderV3.cxx +++ b/common/rfb/SMsgReaderV3.cxx @@ -61,7 +61,6 @@ void SMsgReaderV3::readMsg() case msgTypeFileRenameRequest: case msgTypeFileDeleteRequest: handler->processFTMsg(msgType); break; - case msgTypeEnableContinuousUpdates: readEnableContinuousUpdates(); break; case msgTypeVideoRectangleSelection: readVideoRectangleSelection(); break; default: diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 7c922cfe..95b99fdd 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -35,7 +35,6 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s, : SConnection(server_->securityFactory, reverse), sock(s), server(server_), updates(false), image_getter(server->useEconomicTranslate), drawRenderedCursor(false), removeRenderedCursor(false), - autoUpdatesActive(false), pointerEventTime(0), accessRights(AccessDefault), startTime(time(0)), m_pFileTransfer(0) { @@ -482,35 +481,6 @@ void VNCSConnectionST::framebufferUpdateRequest(const Rect& r,bool incremental) writeFramebufferUpdate(); } -void VNCSConnectionST::enableContinuousUpdates(const Rect& r) -{ - // TightVNC-specific EnableContinuousUpdates message is very much like - // incremental FramebufferUpdateRequest. So here we copy some code from - // VNCSConnectionST::framebufferUpdateRequest(). - - if (!(accessRights & AccessView)) return; - - SConnection::framebufferUpdateRequest(r, true); - - autoUpdatesActive = true; - autoUpdatedRect = r; - - Region reqRgn(autoUpdatedRect); - requested.assign_union(reqRgn); - - writeFramebufferUpdate(); -} - -void VNCSConnectionST::disableContinuousUpdates() -{ - autoUpdatesActive = false; - autoUpdatedRect.clear(); - - writeFramebufferUpdate(); - - // FIXME: Send EndOfContinuousUpdates message. -} - void VNCSConnectionST::setInitialColourMap() { setColourMapEntries(0, 0); @@ -679,15 +649,6 @@ void VNCSConnectionST::writeFramebufferUpdate() if (drawRenderedCursor) writeRenderedCursorRect(); writer()->writeFramebufferUpdateEnd(); - resetRequestedRegion(); - } -} - -void VNCSConnectionST::resetRequestedRegion() -{ - if (autoUpdatesActive) { - requested.reset(autoUpdatedRect); - } else { requested.clear(); } } diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h index a388873d..cde2b31f 100644 --- a/common/rfb/VNCSConnectionST.h +++ b/common/rfb/VNCSConnectionST.h @@ -130,9 +130,6 @@ namespace rfb { virtual void setInitialColourMap(); virtual void supportsLocalCursor(); - virtual void enableContinuousUpdates(const Rect& r); - virtual void disableContinuousUpdates(); - // setAccessRights() allows a security package to limit the access rights // of a VNCSConnectioST to the server. These access rights are applied // such that the actual rights granted are the minimum of the server's @@ -154,8 +151,6 @@ namespace rfb { void setCursor(); void setSocketTimeouts(); - void resetRequestedRegion(); - network::Socket* sock; CharArray peerEndpoint; VNCServerST* server; @@ -165,9 +160,6 @@ namespace rfb { bool drawRenderedCursor, removeRenderedCursor; Rect renderedCursorRect; - bool autoUpdatesActive; // continuous updates enabled - Rect autoUpdatedRect; // continuously updated area - std::set<rdr::U32> pressedKeys; time_t lastEventTime; |