From 883aafaf87ec22aa4c9142ac5c836040a0f531b4 Mon Sep 17 00:00:00 2001 From: auth Date: Sat, 11 Jul 2020 23:19:24 +0200 Subject: Small changes. --- client/src/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'client/src/main.cpp') diff --git a/client/src/main.cpp b/client/src/main.cpp index 8a1aca0..86a73bf 100644 --- a/client/src/main.cpp +++ b/client/src/main.cpp @@ -26,11 +26,11 @@ int main(int argc, char* argv[]) { client.receive_event.add([&](tcp::packet_t& packet) { if (!packet) return; auto message = packet(); - auto action = packet.act; + auto id = packet.id; - if (action == tcp::packet_action::session) { + if (id == tcp::packet_id::session) { client.session_id = packet.session_id; - + tcp::version_t v{0, 1, 0}; auto version = fmt::format("{}.{}.{}", v.major, v.minor, v.patch); io::logger->info("current server version {}", message); @@ -42,15 +42,15 @@ int main(int argc, char* argv[]) { int ret = client.write(tcp::packet_t("hwid", tcp::packet_type::write, client.session_id, - tcp::packet_action::hwid)); + tcp::packet_id::hwid)); if (ret <= 0) { io::logger->error("failed to send hwid."); client.shutdown(); } } - io::logger->info("{}:{}->{} {}", packet.id, packet.session_id, message, - action); + io::logger->info("{}:{}->{} {}", packet.seq, packet.session_id, message, + id); }); while (client) { -- cgit v1.2.3