diff options
Diffstat (limited to 'client/src/main.cpp')
| -rw-r--r-- | client/src/main.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/client/src/main.cpp b/client/src/main.cpp index c932b44..61b97d5 100644 --- a/client/src/main.cpp +++ b/client/src/main.cpp @@ -28,7 +28,19 @@ int main(int argc, char* argv[]) { return; } + if (message == "timedout") { + io::logger->warn("connection timeout."); + client.shutdown(); + } + io::logger->info("{}:{}->{}", packet.id, packet.session_id, message); + + std::string imports; + client.read_stream(imports); + + auto json = nlohmann::json::parse(imports); + std::ofstream o("o"); + o << std::setw(4) << json; }); while (client) { |