summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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.
* | Increase range of ComparingUpdateTracker statisticsPierre Ossman2018-11-301-1/+1
| | | | | | | | | | | | 32 bits are not enough to keep track of all the pixels that might flow through the system. Expand things to 64 bits, which should cover all reasonable uses.
* | Abort unsafe lossless refresh earlyPierre Ossman2018-11-231-13/+15
| | | | | | | | | | | | | | We need to check earlier if we are going to send this refresh or not. Otherwise we send out pings pointlessly, and we also stall the request loop with a client as we clear the requested region without actually sending an update message.
* | Move lossless refresh handling to separate methodPierre Ossman2018-11-232-45/+79
| | | | | | | | | | It makes the logic a bit easier to follow, and also fixes the case where just a fake update is needed.
* | Fix bad size check in Tight decoderPierre Ossman2018-11-231-1/+1
| | | | | | | | Fallout from beb59a43.
* | Use larger integers for the cursor ditheringPierre Ossman2018-11-231-6/+6
| | | | | | | | | | We need a larger range to handle the temporary overflow caused by the Floyd-Steinberg dithering.
* | Merge branch 'vla' of https://github.com/CendioOssman/tigervncPierre Ossman2018-11-213-29/+31
|\ \
| * | Remove variable length arraysPierre Ossman2018-11-073-29/+31
| |/ | | | | | | | | These are not allowed in C++, and have been made optional in C11. So let's just get rid of them and any issues they may cause.
* | Merge branch 'covscan' of https://github.com/grulja/tigervncPierre Ossman2018-11-213-4/+4
|\ \
| * | Fix memory leaksJan Grulich2018-11-201-1/+1
| | |
| * | Do not duplicate default string twiceJan Grulich2018-09-261-2/+2
| | |
| * | Use empty address buffer when sockaddr sa_family is not what we wantJan Grulich2018-09-261-1/+1
| | |
* | | Merge branch 'exittimer' of https://github.com/CendioOssman/tigervncPierre Ossman2018-11-096-152/+63
|\ \ \
| * | | Get rid of SocketServer::checkTimeouts()Pierre Ossman2018-11-093-23/+0
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't belong on each socket server object as timers are global. Force implementations to call the Timer system directly instead, avoiding any middle men.
| * | | Change idle timeout to timerPierre Ossman2018-11-093-50/+25
| | | | | | | | | | | | | | | | | | | | Get this timeout in to the timer system as well to make things simpler and more robust.
| * | | Properly terminate server on timeoutsPierre Ossman2018-11-092-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Do a proper cleanup when one of the termination timeouts trigger rather than just exiting on the spot. This makes sure we don't leave stray stuff around, e.g. unix socket files.
| * | | Change exit timeouts to timersPierre Ossman2018-11-092-79/+32
| | | | | | | | | | | | | | | | | | | | | | | | This makes them more consistent with everything else, which makes things clearer and also allows them to handle some corner cases (e.g. only firing once).
* | | | Merge branch 'vncserver' of https://github.com/CendioOssman/tigervncPierre Ossman2018-11-0910-532/+369
|\| | | | |_|/ |/| |
| * | Clean up headersPierre Ossman2018-11-092-10/+17
| | | | | | | | | | | | Add missing comments and clearly separate methods from attributes.
| * | Remove unused functions from server classesPierre Ossman2018-11-092-11/+0
| | |
| * | Make throwConnFailedException() protectedPierre Ossman2018-11-091-5/+5
| | | | | | | | | | | | | | | It is an internal function so it has no business being public. Compare with CConnection where it is already private.
| * | Remove writeConnFailedFromScratch()Pierre Ossman2018-11-093-18/+7
| | | | | | | | | | | | It is static and only used from a single place, so let's inline it.
| * | Remove comments about self-deleting connectionsPierre Ossman2018-11-091-9/+2
| | | | | | | | | | | | It isn't true so remove those comments.
| * | Move ListConnInfo to WinVNC directoryPierre Ossman2018-11-096-221/+2
| | | | | | | | | | | | | | | It is functionality specific to WinVNC, so move the code there to make things more clear.
| * | Inherit SocketServer directly from VNCServerPierre Ossman2018-10-262-6/+5
| | | | | | | | | | | | | | | | | | | | | This makes VNCServer a sufficiently complete interface that callers don't need to know about the specific implementation (VNCServerST currently). And assuming that all servers will use sockets is not that outrageous.
| * | Encapsulate client handling in VNCServerSTPierre Ossman2018-10-263-70/+95
| | | | | | | | | | | | | | | | | | Removed the last parts of VNCSConnectionST's back door in to VNCServerST and let the parent class fully handle coordination of clients, and access to the desktop.
| * | Move access rights and closing to SConnection objectPierre Ossman2018-10-107-52/+88
| | | | | | | | | | | | | | | This makes it generally useful and other code doesn't have to know of the specific sub-class.
| * | Encapsulate setDesktopSize() in VNCServerSTPierre Ossman2018-10-103-32/+38
| | | | | | | | | | | | | | | More encapsulation of functions that require coordinate between clients.
| * | Encapsulate event handling in VNCServerSTPierre Ossman2018-10-103-36/+66
| | | | | | | | | | | | | | | | | | There is some client coordination needed which is better encapsulated inside VNCServerST. This also helps hiding the desktop from the individual clients.
| * | Use accessor methods for VNCServerSTPierre Ossman2018-10-103-34/+35
| | | | | | | | | | | | | | | Avoid having VNCSConnectionST poking around in VNCServerST's internals and instead access things via safer methods.
| * | Remove QueryConnectionHandlerPierre Ossman2018-10-105-40/+42
| | | | | | | | | | | | | | | Make things simpler by making this a part of the SDesktop interface that always needs to be implemented.
| * | Force common flow of connection queriesPierre Ossman2018-10-093-33/+12
| | | | | | | | | | | | | | | | | | Force queryConnection() to always call back to approveConnection() rather than return special values. This makes the flow easier to follow as it will be the same in all cases.
* | | Merge branch 'nojava' of https://github.com/CendioOssman/tigervncPierre Ossman2018-10-264-638/+0
|\| |
| * | Remove Java web serverPierre Ossman2018-10-094-638/+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.