aboutsummaryrefslogtreecommitdiffstats
path: root/common/rdr
Commit message (Collapse)AuthorAgeFilesLines
* Use std::exception_ptr to store exceptionsPierre Ossman2025-03-134-36/+22
| | | | This is much more robust and flexible than what we came up with.
* Move winerrno.h to corePierre Ossman2025-02-253-3/+3
| | | | | OS abstractions are generic enough that we can merge these with the new core library.
* Rename core/util to core/stringPierre Ossman2025-02-255-5/+5
| | | | | It's just string helper functions here, so let's get rid of the catch-all name for this module.
* Get rid of __rfbmax()/__rfbmin()Pierre Ossman2025-02-251-5/+0
| | | | | | | | They weren't that well used, and were mostly just confusing special functions anyway. Allows us to move away from generic and ambigious headers such as "util".
* Move time utilities to separate filePierre Ossman2025-02-251-1/+1
| | | | Let's clear things up by categorizing our utility functions.
* Move logging to core libraryPierre Ossman2025-02-255-12/+10
| | | | | | | 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-2512-243/+40
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Move utility functions to core libraryPierre Ossman2025-02-138-39/+44
| | | | | | | Make it clearer what is protocol handling and what is just general plumbing. This is one step of several.
* Also mark tls_error with noexceptPierre Ossman2024-11-262-2/+2
| | | | Overlooked this special exception in the previous commit.
* Mark all exception type methods as noexceptPierre Ossman2024-11-262-23/+25
| | | | | This is required for the built in exceptions, so let's do the same to avoid surprises.
* Don't save exceptions as std::exceptionPierre Ossman2024-11-262-6/+14
| | | | | | That type is not guaranteed to preserve anything useful at all. Instead, try to either preserve a more specific type, or use std::runtime_error which at least has a guaranteed message.
* Change some assertions to exceptionsPierre Ossman2024-11-222-3/+7
|
* Capitalize some more logging and exceptionsPierre Ossman2024-11-223-4/+4
|
* Merge branch 'master' of https://github.com/madnicendio/tigervncPierre Ossman2024-11-222-9/+9
|\
| * Capitalize first letter in log, exception & errorMadeleine Nilsson2024-11-212-9/+9
| | | | | | | | The reason for this is to keep a consistency through out the project.
* | Use standard library naming for exceptionsPierre Ossman2024-11-0611-49/+49
| | | | | | | | | | This makes things more consistent since we mix with the standard library exceptions so often.
* | Replace base exception class with standard libraryPierre Ossman2024-11-065-25/+56
| | | | | | | | | | There is no point to having our own generic exception class. Let's use the one provided by the standard C++ library.
* | Use standard exception classesPierre Ossman2024-11-068-33/+31
| | | | | | | | | | Use the more specific already included exception classes for common errors to keep things more understandable.
* | Subclass exceptions from std::exceptionPierre Ossman2024-11-067-24/+13
| | | | | | | | | | Make sure our exceptions are part of the standard exception class hierarchy.
* | Use what() to access exception descriptionPierre Ossman2024-11-063-5/+5
| | | | | | | | Harmonize with the standard C++ exceptions.
* | Don't modify exception description dynamicallyPierre Ossman2024-11-062-56/+56
| | | | | | | | | | In preparation for using the built-in exception types, where the string can only be set via the constructor.
* | Use static string for exceptionsPierre Ossman2024-11-065-18/+30
| | | | | | | | | | In preparation for using the built in C++ exception classes, which do not accept a format string.
* | Get Unicode Windows error stringsPierre Ossman2024-11-061-0/+9
|/ | | | | These seem to always be in ASCII and English, unfortunately, but let's at least use the API the could give use something more useful.
* Split SystemException to handle WindowsPierre Ossman2024-10-094-21/+38
| | | | | | | | | | | | | 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.
* Consistently use SocketException for socket errorsPierre Ossman2024-10-094-8/+8
| | | | | | The behaviour is not consistent as Windows doesn't use errno for socket errors, but Unix systems do. Always use the same exception to keep things somewhat sane.
* Move SocketException to rdrPierre Ossman2024-10-091-0/+4
| | | | | | Socket APIs are used in more places than the abstraction in common/network. Make it easier to use this exception class by putting it in a more common place.
* Use std::min replace minKang Lin2024-07-263-9/+9
|
* Avoid shadowing variablesPierre Ossman2024-06-243-10/+10
| | | | | It's a source of confusion and possibly bugs to reuse the same variable name for multiple things.
* Mark overridden virtual functionsPierre Ossman2024-06-2416-30/+30
| | | | | Use the new "override" keyword to properly differentiate between new virtual methods, and existing virtual methods being overridden.
* Use nullptr in all C++ codePierre Ossman2024-06-2415-51/+53
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Merge branch 'types2' of https://github.com/CendioOssman/tigervncPierre Ossman2023-06-3010-12/+12
|\
| * Consistently use uint8_t for data buffersPierre Ossman2023-03-1810-12/+12
| | | | | | | | | | 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.
* | Emulate corking when TCP_CORK is missingPierre Ossman2023-06-281-1/+6
| | | | | | | | | | If we can't rely on the OS to handle corking for us, then we need to enable our own handling of it.
* | Prefer target_include_directories()Pierre Ossman2023-03-311-5/+4
| | | | | | | | | | It is more specific, and it properly sets up propagation when include directories also need to be used further down a dependency chain.
* | Add all common inter-dependenciesPierre Ossman2023-03-311-1/+1
|/ | | | | This is important in case there are build flags that need to propagate between libraries for things to build correctly.
* Avoid redefining errnoPierre Ossman2023-02-042-12/+12
| | | | | | This can have unexpected consequences as some code may rely on it being a simple variable. Instead to what we do in Socket, which is to define a unique name for getting socket error numbers.
* Get rid of TCHAR magicPierre Ossman2023-02-041-1/+0
| | | | | We never use Windows' "UNICODE" mode anyway, so let's get rid of this complexity.
* Move hex conversion helpers to utilPierre Ossman2023-02-044-78/+8
| | | | | These are used here and there so let's make them more general rather than hiding them in the stream classes.
* Use std::vector for basic data arraysPierre Ossman2023-02-011-71/+0
| | | | | Avoid our own custom types in favour of what's already included with C++.
* Use stdint typesPierre Ossman2023-02-0123-117/+127
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Use __attribute__:s directlyPierre Ossman2023-01-051-7/+2
| | | | | | These are supported by gcc and clang, and I don't think MSVC works well with our code anyway, so let's keep things simple and use these directly.
* Explicitly mark unused parametersPierre Ossman2023-01-041-1/+1
| | | | | This allows us to separate accidentally unused, from explicitly unused parameters, which allows us to turn on such checks in the compiler.
* Mark system include paths correctlyPierre Ossman2023-01-041-3/+3
| | | | | This makes sure the compiler doesn't complain about problems in those files.
* Fix incorrect nettle library referencesPierre Ossman2022-09-011-1/+2
|
* Add support for RSA-AES security typespdlan2022-09-015-0/+296
|
* Fix stream check for InStream::getptr()Pierre Ossman2022-08-251-3/+0
| | | | | This call should have been preceeded by hasData() or avail(), just like all other accessor functions.
* Move include_directories() to proper placesPierre Ossman2022-08-251-1/+3
| | | | We should scope these as narrowely as possible to avoid side effects.
* Use BufferedOutStream in more streamsPierre Ossman2022-08-259-161/+69
| | | | | | Avoid duplicating all the memory mangement, and instead use the BufferedOutStream as a base clase for all out streams that need an intermediate buffer.
* Make BufferedInStream allocation more availablePierre Ossman2022-08-2514-24/+43
| | | | | 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.
* Properly restore cork state when changedPierre Ossman2022-06-282-2/+13
| | | | | | | | | | | | These streams both need to change the corking state temporarily, but it is important it is restored to the previous state or things might get messed up. For the zlib stream it would just leave things uncorked, which still works but is less efficient. But for the TLS stream it might make things very unresponsive as the corking might be left on permanently, delaying packets indefinitely.