This commit is contained in:
2025-04-17 18:28:35 -05:00
parent fa4bbbde0c
commit a728dc2c15
5 changed files with 19 additions and 8 deletions

View File

@@ -166,6 +166,7 @@ bool ServerModule::onEvent(const Archimedes::Event& event) {
//Printf( "Can't accept connection. (It was already closed?)" );
break;
}
std::cerr << "Connection Accepted!\n";
// Assign the poll group
if ( !interface->SetConnectionPollGroup( e.info->m_hConn, pollGroup ) )
@@ -208,7 +209,7 @@ void ServerModule::pollIncomingData() {
ISteamNetworkingMessage *pIncomingMsg = nullptr;
int numMsgs = interface->ReceiveMessagesOnPollGroup( pollGroup, &pIncomingMsg, 1 );
if ( numMsgs == 0 )
break;
return;
if ( numMsgs < 0 )
std::cerr << "Error checking for messages" << std::endl;
assert( numMsgs == 1 && pIncomingMsg );
@@ -216,5 +217,6 @@ void ServerModule::pollIncomingData() {
assert( itClient != clients.end() );
app->emitEvent(new SMEvent::DataRecievedEvent(pIncomingMsg));
return;
}
}