From 94e08f386357d47785b5b94aa3d6e513b734e69e Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Tue, 12 Mar 2024 10:02:53 -0500 Subject: [PATCH] Used blocking recv here, to ensure that we wait for the server to respond --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 60fa236..9b98031 100644 --- a/main.cpp +++ b/main.cpp @@ -108,7 +108,7 @@ GameType check_server_client(int argc, char** argv) { client->create_socket(); /* Send a specific message to the server, and wait for the appropriate response, to know that the server is ready */ client->sendAll("GG"); - std::string msg_from_server = client->recvAllNB(); + std::string msg_from_server = client->recvAll(); if (msg_from_server == "U2") { std::cout << "Connection made. Waiting for server to begin game..." << std::endl; } else {