Loading net/src/socket/gns_socket.cpp +11 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include <iostream> #include <ostream> #include <span> #include <utils/log.hpp> namespace net { Loading Loading @@ -53,7 +54,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (!GameNetworkingSockets_Init(nullptr, err_msg)) { m_status = ConnectionStatus::DISCONNECTED; cerr << err_msg << endl; LOG(LSL_ERROR, err_msg); return false; } Loading @@ -62,7 +63,7 @@ bool GNSSocket::start_server(int port, int max_connections) { GameNetworkingSockets_Kill(); m_status = ConnectionStatus::DISCONNECTED; cerr << "Failed to get SteamNetworkingSockets interface" << endl; LOG(LSL_ERROR, "Failed to get SteamNetworkingSockets interface"); return false; } Loading @@ -77,7 +78,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (m_impl->listen_socket == k_HSteamListenSocket_Invalid) { shutdown(); cerr << "Failed to create listen socket" << endl; LOG(LSL_ERROR, "Failed to create listen socket"); return false; } Loading @@ -85,7 +86,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (m_impl->poll_group == k_HSteamNetPollGroup_Invalid) { shutdown(); cerr << "Failed to create poll group" << endl; LOG(LSL_ERROR, "Failed to create poll group"); return false; } Loading Loading @@ -115,7 +116,7 @@ bool GNSSocket::start_client(std::string address, int port) if (!GameNetworkingSockets_Init(nullptr, err_msg)) { m_status = ConnectionStatus::DISCONNECTED; cerr << err_msg << endl; LOG(LSL_ERROR, err_msg); return false; } Loading @@ -124,7 +125,7 @@ bool GNSSocket::start_client(std::string address, int port) { GameNetworkingSockets_Kill(); m_status = ConnectionStatus::DISCONNECTED; cerr << "Failed to get SteamNetworkingSockets interface" << endl; LOG(LSL_ERROR, "Failed to get SteamNetworkingSockets interface"); return false; } Loading @@ -132,7 +133,7 @@ bool GNSSocket::start_client(std::string address, int port) if (m_impl->poll_group == k_HSteamNetPollGroup_Invalid) { shutdown(); cerr << "Failed to create poll group" << endl; LOG(LSL_ERROR, "Failed to create poll group"); return false; } Loading @@ -140,7 +141,7 @@ bool GNSSocket::start_client(std::string address, int port) if (!server_addr.ParseString(address.c_str())) { shutdown(); cerr << "Failed to parse server address: " << address << endl; LOG(LSL_ERROR, "Failed to parse server address" << address); return false; } server_addr.m_port = static_cast<uint16_t>(port); Loading @@ -152,7 +153,7 @@ bool GNSSocket::start_client(std::string address, int port) if (connection == k_HSteamNetConnection_Invalid) { shutdown(); cerr << "Failed to connect to server" << endl; LOG(LSL_ERROR, "Failed to connect to server"); return false; } Loading @@ -160,7 +161,7 @@ bool GNSSocket::start_client(std::string address, int port) { m_impl->interface->CloseConnection(connection, 0, "Failed to set poll group", false); shutdown(); cerr << "Failed to set connection poll group" << endl; LOG(LSL_ERROR, "Failed to set poll group"); return false; } Loading osi/include/osi/run.hpp +1 −1 File changed.Contains only whitespace changes. Show changes Loading
net/src/socket/gns_socket.cpp +11 −10 Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ #include <iostream> #include <ostream> #include <span> #include <utils/log.hpp> namespace net { Loading Loading @@ -53,7 +54,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (!GameNetworkingSockets_Init(nullptr, err_msg)) { m_status = ConnectionStatus::DISCONNECTED; cerr << err_msg << endl; LOG(LSL_ERROR, err_msg); return false; } Loading @@ -62,7 +63,7 @@ bool GNSSocket::start_server(int port, int max_connections) { GameNetworkingSockets_Kill(); m_status = ConnectionStatus::DISCONNECTED; cerr << "Failed to get SteamNetworkingSockets interface" << endl; LOG(LSL_ERROR, "Failed to get SteamNetworkingSockets interface"); return false; } Loading @@ -77,7 +78,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (m_impl->listen_socket == k_HSteamListenSocket_Invalid) { shutdown(); cerr << "Failed to create listen socket" << endl; LOG(LSL_ERROR, "Failed to create listen socket"); return false; } Loading @@ -85,7 +86,7 @@ bool GNSSocket::start_server(int port, int max_connections) if (m_impl->poll_group == k_HSteamNetPollGroup_Invalid) { shutdown(); cerr << "Failed to create poll group" << endl; LOG(LSL_ERROR, "Failed to create poll group"); return false; } Loading Loading @@ -115,7 +116,7 @@ bool GNSSocket::start_client(std::string address, int port) if (!GameNetworkingSockets_Init(nullptr, err_msg)) { m_status = ConnectionStatus::DISCONNECTED; cerr << err_msg << endl; LOG(LSL_ERROR, err_msg); return false; } Loading @@ -124,7 +125,7 @@ bool GNSSocket::start_client(std::string address, int port) { GameNetworkingSockets_Kill(); m_status = ConnectionStatus::DISCONNECTED; cerr << "Failed to get SteamNetworkingSockets interface" << endl; LOG(LSL_ERROR, "Failed to get SteamNetworkingSockets interface"); return false; } Loading @@ -132,7 +133,7 @@ bool GNSSocket::start_client(std::string address, int port) if (m_impl->poll_group == k_HSteamNetPollGroup_Invalid) { shutdown(); cerr << "Failed to create poll group" << endl; LOG(LSL_ERROR, "Failed to create poll group"); return false; } Loading @@ -140,7 +141,7 @@ bool GNSSocket::start_client(std::string address, int port) if (!server_addr.ParseString(address.c_str())) { shutdown(); cerr << "Failed to parse server address: " << address << endl; LOG(LSL_ERROR, "Failed to parse server address" << address); return false; } server_addr.m_port = static_cast<uint16_t>(port); Loading @@ -152,7 +153,7 @@ bool GNSSocket::start_client(std::string address, int port) if (connection == k_HSteamNetConnection_Invalid) { shutdown(); cerr << "Failed to connect to server" << endl; LOG(LSL_ERROR, "Failed to connect to server"); return false; } Loading @@ -160,7 +161,7 @@ bool GNSSocket::start_client(std::string address, int port) { m_impl->interface->CloseConnection(connection, 0, "Failed to set poll group", false); shutdown(); cerr << "Failed to set connection poll group" << endl; LOG(LSL_ERROR, "Failed to set poll group"); return false; } Loading