aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr/RandomStream.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Move logging to core libraryPierre Ossman2025-02-251-3/+2
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Move base exception classes to core libraryPierre Ossman2025-02-251-4/+7
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Merge branch 'master' of https://github.com/madnicendio/tigervncPierre Ossman2024-11-221-5/+5
|\
| * Capitalize first letter in log, exception & errorMadeleine Nilsson2024-11-211-5/+5
| | | | | | | | The reason for this is to keep a consistency through out the project.
* | Use standard library naming for exceptionsPierre Ossman2024-11-061-3/+3
|/ | | | | This makes things more consistent since we mix with the standard library exceptions so often.
* Split SystemException to handle WindowsPierre Ossman2024-10-091-3/+3
| | | | | | | | | | | | | Windows has (at least) two error namespaces, both errno and GetLastResult(). These overlap, so it is important we keep track of which one we are dealing with. To make things extra problematic, the BSD socket API normally uses errno, but on Windows it has been mapped in to the GetLastResult() namespace. Try to keep better control of this by using separate classes for the namespaces.
* Use nullptr in all C++ codePierre Ossman2024-06-241-3/+5
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Use stdint typesPierre Ossman2023-02-011-3/+3
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Make BufferedInStream allocation more availablePierre Ossman2022-08-251-5/+5
| | | | | Allow subclasses to call it, instead of it being strictly internal. This is useful when a subclass can only provide data in minimum sized chunks.
* Be consistent in including config.hPierre Ossman2021-12-301-0/+4
| | | | | | The generally recommended way is to include it from source files, not headers. We had a mix of both. Let's try to be consistent and follow the recommended way.
* Change streams to be asynchronousPierre Ossman2020-05-211-1/+1
| | | | | | | | | | 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).
* Create common base classes for buffered streamsPierre Ossman2020-05-211-36/+8
| | | | | Most streams are backed by a memory buffer. Create common base classes for this functionality to avoid code duplication.
* Add stream avail() methodsPierre Ossman2020-05-211-1/+1
| | | | | Makes it more readable to write code that needs to know how much data/space is available in a stream.
* Be defensive about overflows in stream objectsPierre Ossman2019-11-151-2/+4
| | | | | | | | | | | | 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-7/+7
| | | | | | | | 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.
* Do proper logging rather than fprintf(stderr, ...)Pierre Ossman2019-04-291-3/+6
|
* Fix bad signed/unsigned comparisonsPierre Ossman2015-03-031-1/+1
| | | | | Either by casting, or switching to a more appropriate type for the variable.
* Migrating to new directory structure adopted from the RealVNC's source tree. ↵Constantin Kaplinsky2006-05-251-0/+130
More changes will follow. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519