aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/CConn.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Explicitly mark unused parametersPierre Ossman2023-01-041-1/+2
| | | | | This allows us to separate accidentally unused, from explicitly unused parameters, which allows us to turn on such checks in the compiler.
* Re-enable lock key sync in viewerPierre Ossman2022-08-311-1/+1
| | | | This was accidentally disabled in 81e114f.
* Cork the proper output stream in the clientPierre Ossman2022-06-281-2/+2
| | | | | | The socket might not be the stream actually used, e.g. when we are using TLS. Make sure we cork the proper stream to get all the benefits of corking.
* Remove unnecessary flushPierre Ossman2022-06-281-1/+0
| | | | Uncorking implicitly flushes, so we don't need this.
* Fix bad indentation in CConn::socketEvent()Pierre Ossman2022-04-061-5/+5
|
* Ignore socket whilst processing dataPierre Ossman2022-04-061-2/+3
| | | | | | | | | | FLTK has a lot of synchronous stuff (like dialogs), which mean that the main loop might be run recursively in some cases. If there is data available on our socket then CConn::socketEvent() will be called constantly in a busy loop. Avoid this by removing socket notifications whilst we are processing data.
* Deduplicate vncviewer error messagesWilliam Sjöblom2021-11-231-2/+1
| | | | | vncviewer previously had a the same localized error message duplicated on a bunch of places. Pull these duplicates out into a single function.
* Retry connection in case of an errorJohannes2021-07-231-6/+6
|
* Support the VMware Cursor Position extension on vncviewerlhchavez2021-03-111-0/+6
| | | | | | | | This change makes it possible for re-synchronizing the remote cursor on the vncviewer when in fullscreen mode. This is done by locally moving the cursor position to what the server thinks it should be. Now SDL games should work!
* Heavily reduce window for bandwidth estimatePierre Ossman2021-01-191-5/+9
| | | | | It took way too long to converge on a sane value, so reduce the window by a factor of ten. This seems to work smoothly.
* Better error messages when terminatingPierre Ossman2020-05-211-8/+12
| | | | | Include something more user friendly when we need to fail fatally and not just the technical error.
* Change streams to be asynchronousPierre Ossman2020-05-211-21/+25
| | | | | | | | | | Major restructuring of how streams work. Neither input nor output streams are now blocking. This avoids stalling the rest of the client or server when a peer is slow or unresponsive. Note that this puts an extra burden on users of streams to make sure they are allowed to do their work once the underlying transports are ready (e.g. monitoring fds).
* Improved bandwidth monitoringPierre Ossman2020-05-211-17/+30
| | | | | | Now measures over an entire update, which should hopefully give us more stable values. They are still small values for fast networks though so increase precision in the values we keep.
* Make sure TLS is allowed to terminate gracefullyPierre Ossman2020-05-211-0/+2
| | | | | | Some systems (like TLS) need to send some final data before closing a connection. Make sure this is properly handled by cleaning up the security object before closing the underlying network socket.
* Allow XK_Scroll_Lock when LED state isn't supportedPierre Ossman2020-01-031-1/+1
| | | | | Otherwise such clients cannot use Scroll Lock at all, and that is probably worse than any effects we might get from getting out of sync.
* Check the correct stream if there is more data pendingPierre Ossman2019-12-091-1/+1
| | | | | | The input stream might no longer be the raw socket, so we need to query what's currently active. That wrapping stream might have its own buffering and may have more data even if the socket is drained.
* Improved clipboard APIPierre Ossman2019-07-011-5/+15
| | | | | Change the internal clipboard API to use a request based model in order to be prepared for more advanced clipboard transfers.
* Clean up internal clipboard handlingPierre Ossman2019-07-011-2/+2
| | | | | | We now filter incoming data, which means we can start assuming the clipboard data is always null terminated. This allows us to clean up a lot of the internal handling.
* Move client attributes out of ServerParamsPierre Ossman2018-11-011-12/+10
| | | | | | ServerParams should contain the server state and not information about client settings or capabilities. Move those things up a level to the CConnection object.
* Merge client resize capabilitiesPierre Ossman2018-11-011-1/+0
| | | | | | No need to have one setting for each extension. All the client code needs to indicate is if it supports resize. The common code can then map this to relevant extensions.
* Remove unused flags from ServerParamsPierre Ossman2018-11-011-1/+0
| | | | These were either completely unused, or always true.
* Move update request handling in to CConnectionPierre Ossman2018-11-011-180/+34
| | | | | It's a generic client thing, so abstract it in to the common library. Makes it easier to integrate with other common code.
* Let CMsgHandler::serverInit() handle initial set upPierre Ossman2018-11-011-5/+1
| | | | | | | Avoid using the callbacks used for runtime changes for the initial setup. They weren't really useful anyway as you could not allocate a framebuffer without also knowing the pixel format. So make things more clear by letting serverInit() get the initial settings.
* Stop requiring CConnection::serverInit() to be overriddenPierre Ossman2018-11-011-4/+2
| | | | | Add an explicit callback for subclasses to do their startup in. This makes it easier to do proper ordering, and avoids mistakes.
* Stop using fences for pixel format switchPierre Ossman2018-11-011-54/+44
| | | | | This method was only really useful when continuous updates was active, so let's rely on a single extension rather than two.
* Split out ServerParams from ConnParamsPierre Ossman2018-11-011-34/+38
| | | | | | We need to track different things in the server and client, so separate things to two independent structures to keep things more clear.
* Encapsulate screen layout storage in ConnParamsPierre Ossman2018-11-011-6/+9
| | | | | | | Avoid direct access to the screen dimensions and layout so that we can make sure it stays sane. This also makes sure the layout is properly updated when we only get the screen dimensions from the server.
* Adjust some strings so they are easier to translatePierre Ossman2018-10-251-5/+8
|
* Add support for Unix socketsPierre Ossman2018-05-291-3/+15
| | | | Patch originally by Dag-Erling Smørgrav for University of Oslo.
* Move server cut text handler to ViewportPierre Ossman2018-03-261-26/+1
| | | | | That way both incoming and outgoing clipboard are both in the same place, making things clearer.
* Replace "frames" with "updates" in statsPierre Ossman2018-03-261-4/+4
| | | | | | The VNC servers aren't great at getting full frames with each update, so avoid calling it "frames per second" in the statistics as that can be misleading.
* Add client support for LED state syncPierre Ossman2017-08-241-0/+9
|
* Allow removal of GUI prompt on fatal errorsDr. David Alan Gilbert2017-07-191-1/+2
| | | | | | | | | | | | | | | | | | | | Add a new parameter 'alertOnFatalError' which guards the displaying of the GUI alert on fatal errors, and thus when false just gives the textual error. Now I can do: while true do vncviewer alertOnFatalError=false vm:0 sleep 1 done and it'll reappear when my VM appears without me getting error dialogs. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> --
* Display performance statistics in viewerPierre Ossman2017-02-241-1/+20
| | | | | | Adds an optional graph to the viewer to display current frame rate, pixel rate and network bandwidth. Makes it easier to debug and test performance related issues.
* Change cursor API to use RGBA dataPierre Ossman2017-02-221-2/+2
| | | | | This will allow us to use better formats that preserve the entire alpha channel.
* Do explict sync after XShmPutImage()Pierre Ossman2017-01-111-19/+0
| | | | | The complex logic waiting for events didn't result in any added performance, so use the simpler approach.
* More robust event and close handlingPierre Ossman2017-01-031-5/+9
| | | | | | There were still some circumstances where we could get stuck reading data and not respect close events properly. Move that logic to a more central place in order to make it more reliable.
* Add option to set primary selection for cut textPierre Ossman2016-03-291-1/+2
| | | | | | Previously the incoming clipboard was unconditionally set to both the PRIMARY and CLIPBOARD selection. This isn't always what the user want, so make it configurable.
* Throttle overlapping screen updatesPierre Ossman2015-11-271-0/+20
| | | | | We need to make sure the display server has finished reading our previous update before we overwrite the buffer with the next update.
* Consolidate how to run the FLTK loop in one placePierre Ossman2015-11-271-7/+1
|
* Let CConnection intercept more callbacksPierre Ossman2015-11-271-0/+4
| | | | | We need more callbacks for correct operation of multi-threaded rect decoding.
* Delegate decoder object management to a separate classPierre Ossman2015-11-271-21/+1
| | | | | | | | | Done in preparation for multi-core decoding. Keeps the complexity out of the other classes. This also moves ownership of the framebuffer in to CConnection. It's the CConnection object that is aware of the threads and how to synchronise with them. Therefore the ownership of the framebuffer must also be there to make sure it isn't deleted whilst threads are working.
* Clean out unused dependencies from CConnection.hPierre Ossman2015-11-091-0/+2
|
* Terminate the viewer even when waiting for dataPierre Ossman2015-09-231-1/+7
| | | | | It should be possible to exit the viewer even if the network has stalled in the middle of a transfer.
* Display partial updates on slow transfersPierre Ossman2015-09-231-0/+16
| | | | | | | Normally we only display screen changes once we have the updates for the entire screen. This may give the impression that the viewer is hung though. So display the partial data if the update is taking to long to arrive.
* Fix mismatches between format string and argumentsPierre Ossman2015-03-031-1/+1
|
* Switch to unsigned parameters for ExtendedDesktopSize handlerPierre Ossman2015-03-031-2/+2
| | | | | The constants used here are unsigned so it makes more sense that the parameters are as well.
* Fix bad signed/unsigned comparisonsPierre Ossman2015-03-031-1/+1
| | | | | Either by casting, or switching to a more appropriate type for the variable.
* Improve some error messagesPierre Ossman2014-12-031-4/+4
|
* Add comments for translators where requestedPierre Ossman2014-12-031-0/+4
|