Almost finished with the TCP Handshake procedure, need to properly handle disconnects (currently pretty forceful)

This commit is contained in:
2025-11-06 22:32:32 +01:00
parent 0f7191ad54
commit c7c3b1c54c
12 changed files with 408 additions and 41 deletions

View File

@@ -43,4 +43,18 @@ namespace ColumnLynx::Utils {
unsigned short serverPort() {
return 48042;
}
std::string bytesToHexString(const uint8_t* bytes, size_t length) {
const char hexChars[] = "0123456789ABCDEF";
std::string hexString;
hexString.reserve(length * 2);
for (size_t i = 0; i < length; ++i) {
uint8_t byte = bytes[i];
hexString.push_back(hexChars[(byte >> 4) & 0x0F]);
hexString.push_back(hexChars[byte & 0x0F]);
}
return hexString;
}
}