Namespacing and Lib for files
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user