Namespacing and Lib for files

This commit is contained in:
2022-09-06 21:15:01 +02:00
parent 2510f4968c
commit 3559b124a7
20 changed files with 262 additions and 119 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ namespace germanairlinesva_websocket
std::function<void(std::string)> toLog;
public:
explicit Websocket(std::string host,
Websocket(std::string host,
std::string user,
std::function<void(const std::string)> toLog);
~Websocket();
+3 -3
View File
@@ -36,7 +36,7 @@ namespace germanairlinesva_websocket
if (msg->type == ix::WebSocketMessageType::Open) {
std::stringstream debug_msg;
debug_msg << "New connection" << std::endl;
debug_msg << std::endl << "New connection" << std::endl;
debug_msg << "Uri: " << msg->openInfo.uri << std::endl;
debug_msg << "Headers:" << std::endl;
for (const auto &it : msg->openInfo.headers) {
@@ -55,7 +55,7 @@ namespace germanairlinesva_websocket
} else {
std::stringstream debug_msg;
debug_msg << "Connection closed" << std::endl;
debug_msg << std::endl << "Connection closed" << std::endl;
debug_msg << "Code: " << msg->closeInfo.code << std::endl;
debug_msg << "Reason: " << msg->closeInfo.reason << std::endl;
debug_msg << "Remote: " << msg->closeInfo.remote << std::endl;
@@ -65,7 +65,7 @@ namespace germanairlinesva_websocket
} else if (msg->type == ix::WebSocketMessageType::Error) {
std::stringstream debug_msg;
debug_msg << "Connection error" << std::endl;
debug_msg << std::endl << "Connection error" << std::endl;
debug_msg << "Decompression: " << msg->errorInfo.decompressionError
<< std::endl;
debug_msg << "HTTP status: " << msg->errorInfo.http_status << std::endl;