aboutsummaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
* Catch exceptions by referencePierre Ossman2018-05-292-2/+2
| | | | | We use polymorphic exception objects, so catching by value invokes the copy constructor and stuff that we don't really want.
* Fix bad reference in TLSException initialiserPierre Ossman2018-05-291-1/+1
|
* Avoid assert crash after bytestream position wrap aroundPeter Åstrand (astrand)2018-05-291-2/+7
| | | | Fixes #652.
* Avoid creating unused thread on single CPU machinesPeter Åstrand (astrand)2018-05-071-1/+7
|
* Flush pending changes when desktop startsPierre Ossman2018-05-071-2/+8
| | | | | | | | | | | The system to avoid processing changes for a stopped desktop was a bit overly aggressive and resulted in those changes getting stuck even when the desktop started again (yet another change was needed to get things rolling again). Make sure we flush out anything pending once the desktop is back up and running. We don't use the frame timer here as we no longer know how old these changes are, so we're not really rate limiting any application.
* Comparing ScreenSet:s should be done without considering orderPeter Åstrand (astrand)2018-05-071-3/+15
| | | | | | Avoids that a viewer connected to Xvnc sometimes disconnects with "Desktop configured a different screen layout than requested" when screens are changing.
* Merge branch 'alr' of https://github.com/CendioOssman/tigervncPierre Ossman2018-04-2013-93/+269
|\
| * Send lossless refresh even with pending updatesPierre Ossman2018-03-283-18/+29
| | | | | | | | | | | | There might be parts of the screen that haven't changed and can therefore be refreshed. Figure which parts these are and send just those.
| * Limit lossless refresh update to safe sizePierre Ossman2018-03-289-18/+73
| | | | | | | | | | | | We don't want to waste bandwidth on the lossless refresh if we might need that bandwidth for a normal update. Try to estimate how much data we can safely send without interfering.
| * Automatic lossless refreshPierre Ossman2018-03-285-20/+128
| | | | | | | | | | | | Resend pixel perfect copies of areas that were previously sent using a lossy encoder. This is done when there is no normal update to send, and no congestion.
| * Avoid checking updates when desktop is stoppedPierre Ossman2018-03-282-11/+18
| | | | | | | | | | | | | | | | No need to run all the update machinery when there is no client connected. This commit also cleans up the stop handling a bit by moving it to its own method.
| * Remove redundant Region::copyFrom()Pierre Ossman2018-03-284-7/+2
| | | | | | | | We already have an assignment operator, so no need for this method.
| * Respect request area for cursor renderingPierre Ossman2018-03-282-39/+39
| | | | | | | | | | | | | | We cannot send updates for a cursor that is outside the requested region, so make sure we track things properly. This also has the nice side effect of just re-sending the bits needed when the cursor overlaps a changed part of the framebuffer.
* | Remove no longer relevant license commentPierre Ossman2018-03-281-14/+0
| |
* | Stop abusing InputHandler class for write classPierre Ossman2018-03-282-11/+8
| | | | | | | | | | | | The handler is for incoming data and we should not be abusing that class for the writer class. Do proper write prototypes for the relevant functions.
* | Add missing break for LED state checkPierre Ossman2018-03-281-0/+1
|/ | | | | The previous code would incorrectly also add support for QEMU key events if LED state was supported.
* VNCServerST: Allow unsetting pixel buffer.Michal Srb2018-03-071-10/+6
| | | | | Originally calling VNCServertST::setPixelBuffer(PixelBuffer* pb_) with pb_=0 would do nothing. With this change pb will be set to 0 and deferred update timer will be stopped.
* Fix rounding error in pixel down conversionPierre Ossman2018-03-014-20/+26
| | | | | | Simple shifting can give noticable rounding errors if there is a large difference in the number of bits between the formats. Do the proper thing via a lookup table, the same way things are done for up conversion.
* Merge branch 'congestion' of https://github.com/CendioOssman/tigervncPierre Ossman2018-02-2611-219/+650
|\
| * Add crude congestion window debug tracePierre Ossman2017-11-173-0/+44
| | | | | | | | | | Allows us to compare our computed congestion window with the underlying one used by the TCP layer.
| * Add simple slow start to congestion controlPierre Ossman2017-11-172-22/+56
| |
| * Improved congestion control handlingPierre Ossman2017-11-176-118/+363
| | | | | | | | | | | | Refine the previous method by interpolating the values we need. This reduces the effect of the problem that we cannot send enough ping packets.
| * Move congestion control to its own classPierre Ossman2017-11-175-207/+292
| | | | | | | | | | It's a general function and it's better to have that particular complexity in its own place.
| * Reduce header dependencies in server classesPierre Ossman2017-11-175-13/+19
| |
| * Use a queue for congestion pingsPierre Ossman2017-11-172-16/+30
| | | | | | | | | | This reduces the data sent, and avoids any problems with the client corrupting it.
| * Handle timers which should be executed right awayPierre Ossman2017-11-171-0/+3
| |
* | Fix bug where server cursor might disappearPierre Ossman2017-11-171-6/+4
| | | | | | | | | | | | | | We shouldn't unconditionally remove the server side cursor just because the client supports client side cursors. We need to also check that the client fulfills the other criteria for taking over the cursor.
* | Avoid extra framebuffer update messagesPierre Ossman2017-11-171-17/+5
| | | | | | | | | | | | In most cases we will send an update at the end of processing client messages so these extra calls only slow things down. Server initiated events still need an explicit call though.
* | Fix for initial client side cursorPierre Ossman2017-11-172-4/+9
| | | | | | | | | | | | | | | | Improve the tracking of what cursor we've sent to the client to make sure the initial cursor is sent properly. We previously tried to infer this information based on if we've rendered a server side cursor or not. This logic broke down if things triggered before we've sent the first update to the client.
* | Fix "int-in-bool-context" compile errorsBrian P. Hinz2017-11-162-2/+2
| |
* | Merge pull request #500 from bphinz/issue106-rebaseBrian Hinz2017-11-151-3/+11
|\ \ | | | | | | Hook up the "Load X.509 Cert/Key" dialogs in winvnc. Fixes #106
| * | avoid putting more includes in headers than necessaryBrian P. Hinz2017-11-152-1/+1
| | |
| * | Move gnutls functions into SSecurityTLSBrian P. Hinz2017-11-142-3/+11
| | |
* | | Fully standardise on send()/recv()Pierre Ossman2017-11-082-7/+6
| | | | | | | | | | | | We already assume sockets here since we use select().
* | | Merge branch 'x0-xdesktop-initial-cursor' of ↵Pierre Ossman2017-11-088-13/+42
|\ \ \ | | | | | | | | | | | | https://github.com/x11clone/x11clone
| * | | x0vncserver does not support SetDesktopSize; remove -AcceptSetDesktopSizePeter Åstrand (astrand)2017-11-082-0/+24
| | | | | | | | | | | | | | | | Add a Configuration::removeParam to support such cases.
| * | | Remove support for Lynx/OSPeter Åstrand (astrand)2017-11-081-5/+0
| | | |
| * | | Added my/Cendio copyright where relevantPeter Åstrand (astrand)2017-11-081-0/+1
| | | |
| * | | Use send() with MSG_DONTWAIT when possiblePeter Åstrand (astrand)2017-11-081-1/+9
| | | |
| * | | Define cork() as pure virtual in Socket classPeter Åstrand (astrand)2017-11-084-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to create a derived class from Socket which is not TCP based, without having VNCSConnectionST.cxx trying to call setsockopt() on a non-socket.
* | | | Avoid corner case of applications rendering at frame ratePierre Ossman2017-11-061-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a problematic corner case where an application is updating at exactly the same rate that we're sending update. In that case we may miss updates regularly, getting a very uneven final frame rate. Avoid this by introducing a slight offset when we start updating.
* | | | Fix broken logic for sending mouse cursorPierre Ossman2017-11-061-2/+3
|/ / / | | | | | | | | | | | | The logic got inverted resulting in the cursor being sent needlessly whenever the cursor moved.
* | | Make exception classes have clearer messagesPierre Ossman2017-10-126-39/+47
| | | | | | | | | | | | | | | Include the type of exception in the string generated by each subclass. Also simplify the constructs to what is needed.
* | | Push query connect timeout back in to XvncPierre Ossman2017-10-044-16/+2
| | | | | | | | | | | | | | | | | | It was moved to the common code in f8e3b34c6, but it was unreliable because the state could sometimes get out of sync. Push it back in to Xvnc since it isn't necessarily something all servers will have.
* | | Keep alpha in cursor alpha conversionPierre Ossman2017-10-021-1/+0
| | | | | | | | | | | | | | | Don't touch the existing value or we might mess it up when we avoid division by zero.
* | | Make sure to start the frame timer after a buffer changePierre Ossman2017-09-221-0/+1
| | | | | | | | | | | | | | | The buffer is considered changed right away, so we might not get any add_changed() calls to trigger a start of the timer.
* | | Get rid of getFbSize()/getDesktopSize() in commonPierre Ossman2017-09-222-9/+0
| | | | | | | | | | | | It was only used by WinVNC, so push it there instead.
* | | Don't throw exceptions in destructorsPierre Ossman2017-09-151-10/+2
| | |
* | | Merge branch 'fix-warnings'Pierre Ossman2017-09-1520-21/+54
|\ \ \
| * | | rfb: Avoid unused argument warnings in headersSteve Kondik2017-09-154-7/+18
| | | | | | | | | | | | | | | | | | | | Don't force users of these headers to squash compiler warnings about unused arguments, annotate with __unused_attr.