aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/OutStream.h
Commit message (Collapse)AuthorAgeFilesLines
* Use nullptr in all C++ codePierre Ossman2024-06-241-1/+1
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Consistently use uint8_t for data buffersPierre Ossman2023-03-181-1/+1
| | | | | These will always be byte streams at heart, so let's try to keep them with a proper type. Should make it clearer how they will be used.
* Use stdint typesPierre Ossman2023-02-011-20/+26
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Only implicitly flush on uncorkingPierre Ossman2022-06-281-1/+1
| | | | | There is no point flushing when corking was enabled, as we might then push out a small buffer that the corking otherwise would have preserved.
* Change streams to be asynchronousPierre Ossman2020-05-211-8/+6
| | | | | | | | | | 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).
* Remove readString()/writeString()Pierre Ossman2020-05-211-10/+0
| | | | | These are not universal in the protocol so having functions for them only obfuscates things.
* Make direct stream API a bit saferPierre Ossman2020-05-211-6/+10
| | | | | Provide some safety checks when directly accessing the underlying pointer of streams.
* Generalise corking to all output streamsPierre Ossman2020-05-211-1/+7
| | | | | The principle can be used in a more general fashion than just TCP streams.
* Simplify stream availability handlingPierre Ossman2020-05-211-20/+14
| | | | | Just have a simply number of bytes argument to avoid a lot of complexity.
* Add stream avail() methodsPierre Ossman2020-05-211-2/+10
| | | | | Makes it more readable to write code that needs to know how much data/space is available in a stream.
* Remove OutStream::skip()Pierre Ossman2020-05-211-8/+0
| | | | | It might leak data depending on what's in the buffer. Use pad() instead where blank space is needed.
* Be defensive about overflows in stream objectsPierre Ossman2019-11-151-11/+13
| | | | | | | | | | | | We use a lot of lengths given to us over the network, so be more paranoid about them causing an overflow as otherwise an attacker might trick us in to overwriting other memory. This primarily affects the client which often gets lengths from the server, but there are also some scenarios where the server might theoretically be vulnerable. Issue found by Pavel Cheremushkin from Kaspersky Lab.
* Use size_t for lengths in stream objectsPierre Ossman2019-11-151-10/+10
| | | | | | | | Provides safety against them accidentally becoming negative because of bugs in the calculations. Also does the same to CharArray and friends as they were strongly connection to the stream objects.
* Add efficient method to copy data between two streamsPierre Ossman2015-11-271-0/+12
|
* Remove unneeded virtual qualifiers on stream methodsPierre Ossman2015-11-271-1/+1
|
* Push encoding specific formats into the encoders and decodersPierre Ossman2014-07-071-25/+0
| | | | Keep the generic stream classes clean and general.
* Migrating to new directory structure adopted from the RealVNC's source tree. ↵Constantin Kaplinsky2006-05-251-0/+171
More changes will follow. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519