From fc4aa20005abe05b7055d9c59a827053283c88a4 Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Mon, 23 Oct 2023 16:54:09 -0400 Subject: [PATCH] Update server.cpp --- SQCSim-srv/server.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SQCSim-srv/server.cpp b/SQCSim-srv/server.cpp index 8f4f9a6..aad9971 100644 --- a/SQCSim-srv/server.cpp +++ b/SQCSim-srv/server.cpp @@ -162,13 +162,17 @@ int Server::Ready() { void Server::Run() { char* buf = new char[BUFFER_LENGTH]; + uint32_t buflen = BUFFER_LENGTH; + netprot::Input in; Log("Partie en cours...", false, false); while (true) { if (recv(m_sock_udp, buf, BUFFER_LENGTH, 0) > 0) { - - + Deserialize(&in, buf, buflen); + std::cout << "Id: " << in.sid << "\r\n" + << "Direction: { " << in.direction.x << ", " << in.direction.y << ", " << in.direction.z << " }" << "\r\n"; } + std::cout << "!" << std::endl; } }