diff options
| author | auth <[email protected]> | 2020-07-02 14:20:45 +0200 |
|---|---|---|
| committer | auth <[email protected]> | 2020-07-02 14:20:45 +0200 |
| commit | 8c78e28b7ff3fbc7f6a84b6adc417e1ce6ca13a3 (patch) | |
| tree | 50c160f522ac1b4ba15d6ea471eed913bdc7b246 /client/src/main.cpp | |
| parent | Added json implementation for packets. (diff) | |
| download | loader-8c78e28b7ff3fbc7f6a84b6adc417e1ce6ca13a3.tar.xz loader-8c78e28b7ff3fbc7f6a84b6adc417e1ce6ca13a3.zip | |
Added client timeout.
Added json imports for pe images.
Added wrapper to support streaming strings.
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) { |