diff --git a/hardware_simulation/UDPClient.hpp b/hardware_simulation/UDPClient.hpp index f4f9fc3..4484962 100644 --- a/hardware_simulation/UDPClient.hpp +++ b/hardware_simulation/UDPClient.hpp @@ -136,9 +136,12 @@ class UDPClient { local_addr.sin_family = AF_INET; local_addr.sin_addr.s_addr = INADDR_ANY; local_addr.sin_port = htons(SIM_LOCAL_PORT); + + std::cout << "Attempting local bind on port " << std::to_string(SIM_LOCAL_PORT) << std::endl; if (bind(socket_fd, (struct sockaddr*)&local_addr, sizeof(local_addr)) == -1) { - std::cerr << "Bind failed" << std::endl; + std::cerr << "Bind failed on port " << std::to_string(SIM_LOCAL_PORT) << std::endl; + return false; } @@ -219,4 +222,4 @@ class UDPClient { UDPClient(const UDPClient&) = delete; UDPClient& operator=(const UDPClient&) = delete; -}; \ No newline at end of file +};