| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The system shutdown() function doesn't drop buffered data, so neither
should we.
We had one fix in place, but that didn't cover all cases. Move this
handling to all socket like classes we have.
|
| |
|
| |
|
|
|
|
|
| |
This makes things more consistent since we mix with the standard library
exceptions so often.
|
|
|
|
| |
Make it easier to identify communication issues.
|
|
|
|
|
| |
Use the more specific already included exception classes for common
errors to keep things more understandable.
|
|
|
|
|
| |
This is the user actively rejecting the connection, and should be
signalled as such for correct behaviour.
|
|
|
|
|
| |
Problems with the original code: A process can only establish one connection.
After modification, multiple connections can be supported.
|
|
|
|
|
| |
The usage of this is unclear as it is never caught. Use the general
exception class, to stay consistent with all other protocol handling.
|
|
|
|
|
|
|
|
| |
This exception is for when the user fails to authenticate, not all
possible errors that might occur during the authentication phase.
Use more appropriate exception types for the various other problems that
might occur, so that we can present things more accurately to the user.
|
|
|
|
|
| |
It's a source of confusion and possibly bugs to reuse the same variable
name for multiple things.
|
|
|
|
|
| |
It's more readable than 0, and a bit safer than NULL, so let's try to
follow modern norms.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
These files don't use anything from this header, so remove the include.
This exposes some missing includes in other places, though. So add an
explicit include in the files that were relying on an indirect
inclusion.
|
|
|
|
|
| |
This matches the naming in STL, which is what we are mostly mimicing now
that we are using std::string for these functions.
|
|
|
|
|
| |
Let's use a more common type instead of something homegrown. Should be
more familiar to new developers.
|
|
|
|
|
|
| |
We mostly use classical C strings, but the memory management around them
can get confusing and error prone. Let's use std::string for the cases
where we need to return a newly allocated string.
|
|
|
|
|
| |
Avoid having our own custom stuff and instead use the modern, standard
types, for familiarity.
|
|
|
|
|
| |
This allows us to separate accidental fall through from explicit ones,
which allows us to turn on such checks in the compiler.
|
|
|
|
|
|
|
|
|
|
| |
If there isn't enough data, then the client reading the hash will fall
down and try to read the subtype instead, which isn't correct.
Invert the logic so we get a more consistent way through where we only
break out when there is insufficient data.
Do the same for the server code, for consistency.
|
|
|