summaryrefslogtreecommitdiffstats
path: root/common
Commit message (Collapse)AuthorAgeFilesLines
...
* Flush socket before checking bufferPierre Ossman2016-04-291-0/+1
| | | | | | There might be stuff lingering in the buffer simply because flush() hasn't been called in a while, rather than because the transport is congested.
* Asynchronously retry update on congestionPierre Ossman2016-04-292-12/+7
| | | | | | We now get notifications when the output buffer empties, and we already caught incoming RTT pongs, meaning we can now react at the proper time to retry a congested update rather than use a timer.
* Flush socket after ever rectPierre Ossman2016-04-291-0/+1
| | | | | This makes sure we keep the socket busy even if one rect takes some time to encode.
* Move socket write event handling in to the RFB corePierre Ossman2016-04-297-8/+66
| | | | | | What to do when a socket is writeable should be handled in the RFB core code as there may be other events we want to fire off when this happens.
* Clean up FdOutStream::flush()Pierre Ossman2016-04-291-21/+3
| | | | The logic was a bit confusing and superfluous.
* Remove Windows 98 socket workaroundPierre Ossman2016-04-291-26/+22
| | | | We haven't supported such an old version of Windows for some time.
* Early propagate of access rights to connection.Henrik Andersson2016-01-271-1/+1
|
* Block signals from being handled on worker threadsPierre Ossman2016-01-041-0/+12
|
* Compile common code with -fPIC on all non-Windows platformsPierre Ossman2016-01-041-1/+1
| | | | | There are more platforms than x86_64 that need -fPIC, so include it whenever possible.
* Fix race problem with detecting listening inetd socketsTristan Schmelcher2015-12-292-13/+8
| | | | | | The previous detection would fail if the socket closed before we had time to inspect it, which got us stuck in a loop as we would try (and fail) to do accept() on a non-listening socket.
* Add workaround for Vino's VeNCrypt implementationPierre Ossman2015-12-291-1/+12
|
* Include class keyword for friend declarationPierre Ossman2015-12-081-1/+1
| | | | | Only C++11 allows omitting the class keyword, so include it so the code compiles with older compilers.
* Init socket subsystem before parsing filtersPierre Ossman2015-12-071-0/+2
| | | | | | Parsing a filter might be the first thing we do so we need to make sure the socket subsystem is running so that we can look up names.
* Optimised shortcut for decoding on single CPU systemsPierre Ossman2015-11-271-1/+17
|
* Limit the number of decoder threads to 4Pierre Ossman2015-11-271-1/+6
| | | | | They just end up burning CPU fighting each other without much improvement to the decoding time beyond four threads.
* Propagate exceptions from worker threads back to main threadPierre Ossman2015-11-272-3/+44
|
* Create one decode thread for each CPUPierre Ossman2015-11-273-4/+44
| | | | | | We can start creating more decoding threads now that we handle rect ordering properly. No point in creating more threads than there are CPUs though.
* Allow parallel decoding of Tight JPEG rectsPierre Ossman2015-11-272-6/+2
| | | | | | The cost is some more load on malloc(), but it should be small compared to the gains of spreading the CPU heavy JPEG decoding over multiple CPUs.
* Allow conditional dependencies between rects when decodingPierre Ossman2015-11-275-1/+80
| | | | | | Some encodings only cause dependencies between rects some of the time. Make sure we can allow parallel decoding of those rect that aren't dependent on each other.
* Decode rectangles in order if neededPierre Ossman2015-11-274-4/+15
| | | | | Some encodings must be handled in the order they are received. Make sure we respect this in the decode manager.
* Decode overlapping rectangles in orderPierre Ossman2015-11-276-3/+58
|
* Add flags member to decodersPierre Ossman2015-11-278-8/+17
| | | | | Allows us to add attributes later that affect of the decoder manager deals with the decoders.
* Make the decoder multi-threadedPierre Ossman2015-11-275-9/+258
| | | | | | | This implements the basic infrastructure for multi-threaded decoding of rects. However there is just one thread reading data and one thread decoding it. More logic is needed to safely decode multiple rects at the same time.
* Let CConnection intercept more callbacksPierre Ossman2015-11-272-0/+32
| | | | | We need more callbacks for correct operation of multi-threaded rect decoding.
* Add abstraction classes for system thread primitivesPierre Ossman2015-11-275-0/+403
|
* Fix copy-paste error for the secTypeX509Vnc security typePierre Ossman2015-11-271-1/+1
|
* Clear up ZlibInStream::reset() behaviourPierre Ossman2015-11-274-18/+46
| | | | | | | | | It previously only did a reset of the ZlibInStream object, not the underlying zlib stream. It also had the side effect of flushing the underlying stream and disassociating from it. Clear things up by changing the naming, and introducing a proper reset function (which is needed by the Tight decoder).
* Split decoders into a read and decode stepPierre Ossman2015-11-2717-364/+622
| | | | | | | | We need to split these steps up in preparation for multi-core support. Reading needs to be done in a serial manner, whilst decoding can be done in parallel. This also involved a rather large cleanup of the Tight decoder.
* Add efficient method to copy data between two streamsPierre Ossman2015-11-271-0/+12
|
* Remove unneeded virtual qualifiers on stream methodsPierre Ossman2015-11-272-2/+2
|
* Remove CMsgReader::getImageBuf() as nothing uses itPierre Ossman2015-11-272-26/+1
|
* Decouple decoders from CConnectionPierre Ossman2015-11-2716-83/+110
|
* Make ConnParams useful when constPierre Ossman2015-11-272-8/+8
|
* Delegate decoder object management to a separate classPierre Ossman2015-11-275-1/+173
| | | | | | | | | 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-094-4/+11
|
* Remove old Windows CE codePierre Ossman2015-11-092-11/+0
|
* Use mingw's gettimeofday()Pierre Ossman2015-11-092-71/+3
| | | | | mingw has a perfectly functional gettimeofday() so use that instead of having multiple copies of our own version.
* Remove unused deleteReaderAndWriter() methodPierre Ossman2015-11-094-24/+0
|
* Flush entire JPEG buffer, ignoring statePierre Ossman2015-10-161-1/+1
| | | | | | libjpeg doesn't update the buffer state before calling the empty_output_buffer() callback so we need to flush everything, not just the apparent size.
* Don't shadow member variablePierre Ossman2015-09-291-1/+1
|
* Avoid dropping const qualifier needlesslyPierre Ossman2015-09-291-1/+1
|
* Return TcpListener pointers rather than objectsPierre Ossman2015-09-292-82/+50
| | | | | | It is easier to control object life time and avoid magical socket duplication by having a single TcpListener object to pass around. We have to be more careful about deleting the object though.
* Return correct error code from bind()Pierre Ossman2015-09-291-1/+2
| | | | | Closing the socket might overwrite errno so we need to save its value.
* Don't leak socket on setsockopt() errorsPierre Ossman2015-09-291-2/+5
|
* Track statistics for CopyRectPierre Ossman2015-09-222-0/+32
|
* Add keyboard debug log to serversPierre Ossman2015-08-311-4/+21
| | | | | Makes it easier to troubleshoot keyboard issues by printing exactly what key events the server is getting from the client.
* Log which addresses connection attempts are made againstPierre Ossman2015-07-301-0/+6
|
* Properly report connect error codesPierre Ossman2015-07-301-11/+13
| | | | | The logic was flawed and would treat all connect errors as if there were no addresses found.
* Fix infinite update caused by b64dbf2Pierre Ossman2015-06-231-1/+1
| | | | | | The bug fix in b64dbf2 didn't account for the proper request region in the case of continuous updates. Make sure we use the proper variable for which region we've sent updates for.
* Fix some bad signed/unsigned mismatchesPierre Ossman2015-06-171-1/+1
|