void NetworkServer::update() { receivePackets(); if (needToBroadcast) { broadcastUpdate(); needToBroadcast = false; } }
void Server::update() { checkNewConnections(); checkDisconnections(); receivePackets(); game.update(clients); }
//***************************************************************************** // // //***************************************************************************** void receivePayLoad(void) { int iReturnValue = receivePackets(); if (iReturnValue > 0) { payloadReceived(requestBuffer, iReturnValue); } }
void InfinityPortal::sendPacket(unsigned char* packet) { int len; int retVal = -1; receivePackets(); while(retVal < 0) { retVal = libusb_bulk_transfer(deviceHandler,0x01,packet,32,&len,100); receivePackets(); } // if(retVal != 0) { // printf("Error code: %d\n",retVal); // printf("Error name: %s\n",libusb_error_name(retVal)); // exit(1); // } }
void LANGameFinderAndAnnouncer::update() { if(serverPort > 0) { if(SDL_GetTicks() - lastAnnounce > LANGAME_ANNOUNCER_INTERVAL) { announceGame(); } } updateServerInfoList(); receivePackets(); }
void netHandler::tick() { receivePackets(); }