aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb
Commit message (Collapse)AuthorAgeFilesLines
* Handle line breaks in log messagesPierre Ossman2018-12-101-1/+10
|
* Require all SMsgWriter caller to check capabilitiesPierre Ossman2018-12-103-21/+18
| | | | | | Make the API consisitent by requiring the caller to check what the client supports before calling any of the write* functions. This avoids the confusion that the functions might not always do anything.
* Abstract sending cursor and resizing the desktopPierre Ossman2018-12-105-158/+93
| | | | | | Avoid having the callers need to know about the different variants of these functions and instead have the writer pick the most appropriate extension.
* Always send current screen layout to clientPierre Ossman2018-12-103-19/+7
| | | | | | This is what the protocol requires, rather than sending what the client specified in the request. This should be the same in practice except for failures and possibly some races.
* Move client attributes out of ServerParamsPierre Ossman2018-11-014-23/+26
| | | | | | 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-014-4/+28
| | | | | | 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.
* Don't update screen layout directly on incoming client requestPierre Ossman2018-11-012-9/+2
| | | | It needs to be validated and take effect in the server first.
* Remove unused flags from ServerParamsPierre Ossman2018-11-013-12/+2
| | | | These were either completely unused, or always true.
* Simplify encoding list generatorPierre Ossman2018-11-011-30/+2
| | | | | Tight is the default preferred encoding, so we don't really need special handling for it to be first in the list.
* Use STL list for encoding listPierre Ossman2018-11-013-27/+29
| | | | | This is a lot safer and cleaner. The old code had a fixed size that we didn't properly keep track of.
* Make arguments explicit in all message writer methodsPierre Ossman2018-11-017-87/+88
| | | | | | Make sure all methods only write what is given as arguments, and avoid side effects by getting data from parameter objects. This keeps things readable in the calling code.
* Move update request handling in to CConnectionPierre Ossman2018-11-012-0/+203
| | | | | 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-015-12/+32
| | | | | | | 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-012-6/+16
| | | | | Add an explicit callback for subclasses to do their startup in. This makes it easier to do proper ordering, and avoids mistakes.
* Remove unused CConnection::getIdentityVerifier()Pierre Ossman2018-11-011-4/+0
|
* Remove indirect capability attributesPierre Ossman2018-11-016-108/+78
| | | | | Better to check the actual list of supported encodings directly. Makes parts more readable, and no risk of getting out of sync.
* Move copy rect handling to EncodeManagerPierre Ossman2018-11-014-24/+8
| | | | | No need to spread things out. Keep all of the handling in a single place to make things clearer.
* Rename ConnParams to ClientParamsPierre Ossman2018-11-0116-165/+161
| | | | | | Now that we've split out server state to ServerParams, ConnParams only contains state for a client. Rename the class and variables to reflect this.
* Split out ServerParams from ConnParamsPierre Ossman2018-11-0125-121/+317
| | | | | | 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-018-43/+61
| | | | | | | 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.
* Move version reading/writing out of ConnParamsPierre Ossman2018-10-264-42/+41
| | | | | That object is just a container for the current state. Move the I/O to the classes already doing such stuff.
* Remove unused includePierre Ossman2018-10-262-2/+0
| | | | | We should not be including server headers from client code. It was not even needed, so simply remove it.
* Merge branch 'nojava' of https://github.com/CendioOssman/tigervncPierre Ossman2018-10-263-536/+0
|\
| * Remove Java web serverPierre Ossman2018-10-093-536/+0
| | | | | | | | | | Applets don't work anymore so remove everything that has to do with serving them.
* | Merge branch 'master' of https://github.com/grulja/tigervncPierre Ossman2018-10-261-1/+1
|\ \
| * | Avoid potential crash when replacing buffer in PlainPasswdJan Grulich2018-10-031-1/+1
| |/
* / Log TLS handshake resultPierre Ossman2018-10-092-1/+5
|/ | | | | Makes it easier to debug TLS issues, and to see the effect of altering the priority string.
* Restore original streams when terminating TLSPierre Ossman2018-09-214-2/+27
| | | | | | In theory we could return to communicate without TLS after a shutdown. It also makes sure the connection object isn't left completely without streams.
* Delete TLS streams before deleting the sessionPierre Ossman2018-09-214-33/+40
| | | | | | The streams depend on the session and can crash the program if they are removed in the wrong order. Do a general cleanup of the life time management of the streams.
* Strongly bind security objects to connection objectPierre Ossman2018-09-2130-93/+123
| | | | | There is already an implicit connection between them, so let's make it explicit. This allows easy lookup outside of the processMsg() function.
* Initialise CSecurityTLS::cert_cred properlyPierre Ossman2018-09-211-1/+1
| | | | | If we leave it at something random we'll get an invalid delete if the handshake fails.
* Remove destroy functionsPierre Ossman2018-09-214-4/+4
| | | | | These are just confusing and obfuscating. Do a normal delete of these objects instead.
* Estimate higher bandwidth in slow startPierre Ossman2018-09-211-2/+11
| | | | | | | If we are still in slow start then we haven't discovered the actual bandwidth limit yet. We also rely on the caller causing a bit of congestion to detect the limit. So report a higher bandwidth estimate than what we've currently tested in this scenario.
* Allow perceptually lossless refreshPierre Ossman2018-09-214-12/+36
| | | | | | | | | | | Loosen the definition of "lossless" a bit so that we can use high quality JPEG to refresh damaged parts of the screen. Although this isn't bit perfect, it is close enough that most users will not be able to tell the difference. Level 9 is used rather than level 8 because some monitors have exaggerated contrast that allows the artefacts from level 8 to be noticeable.
* Add method to get compression settings from encoderPierre Ossman2018-09-203-0/+10
|
* Don't force encoders to specify palette sizePierre Ossman2018-09-205-5/+5
| | | | | Most encoders don't have a palette mode, so don't force them to specify a dummy value to the Encoder base class constructor.
* Limit maximum lossless refresh CPU usagePierre Ossman2018-09-201-2/+7
| | | | | | If we have plenty of bandwidth then CPU might be the limiting resource. Unfortunately we don't have a good number for that limit, so add a conservative hard coded value.
* Don't attempt to send empty lossless refreshPierre Ossman2018-09-201-6/+9
| | | | | If we're out of time then we will definitely overshoot, so don't even try.
* Fix calculation of maximum lossless refresh areaPierre Ossman2018-09-201-0/+3
| | | | | The update size is in bytes, but we are counting pixels. So make sure we convert things properly before comparing.
* Avoid refresh of recently changed areasPeter Åstrand (astrand)2018-09-204-11/+80
| | | | | | | | If an area recently changed then we can guess that it will most likely change again very soon. In such a case it is meaningless to send a lossless refresh as it will directly be overwritten. Keep track of such areas and avoid refreshing them until we no longer see any changes to them.
* Fix bad reference in Timer::getRemainingMs()Pierre Ossman2018-09-201-1/+1
| | | | | The reference for "dueTime" wasn't properly updated when this code was refactored from a static method to a normal object method.
* Avoid compiler "use of uninitialised variable" warningsPierre Ossman2018-09-131-32/+33
| | | | | The compiler isn't smart enough to figure all of these out, so restructure things a bit to avoid warnings.
* Use system certificate trust storePierre Ossman2018-08-161-0/+3
| | | | | Makes it possible to use certificates from all popular CAs with TigerVNC.
* Avoid integer overflows in pixel size calculationsPierre Ossman2018-07-256-20/+23
|
* Fix bad type on congestion ETA variablePierre Ossman2018-07-171-1/+1
|
* Merge branch 'unix' of https://github.com/CendioOssman/tigervncPierre Ossman2018-05-291-1/+1
|\
| * Handle hexadecimal and octal parametersPierre Ossman2018-05-031-1/+1
| |
* | 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.
* | 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
| |