Change: [Network] Transfer command data as serialized byte stream without fixed structure.

The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
This commit is contained in:
Michael Lutz
2021-10-28 23:48:26 +02:00
parent b0990fcff7
commit a05fd7aa50
15 changed files with 455 additions and 35 deletions

View File

@@ -28,6 +28,7 @@
#include <iosfwd>
#include "core/bitmath_func.hpp"
#include "core/span_type.hpp"
#include "string_type.h"
char *strecat(char *dst, const char *src, const char *last) NOACCESS(3);
@@ -39,6 +40,8 @@ int CDECL vseprintf(char *str, const char *last, const char *format, va_list ap)
char *CDECL str_fmt(const char *str, ...) WARN_FORMAT(1, 2);
std::string FormatArrayAsHex(span<const byte> data);
void StrMakeValidInPlace(char *str, const char *last, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK) NOACCESS(2);
[[nodiscard]] std::string StrMakeValid(const std::string &str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);
void StrMakeValidInPlace(char *str, StringValidationSettings settings = SVS_REPLACE_WITH_QUESTION_MARK);