test
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user