int main(void) { // puts("World starting... "); receiveMessages(); // start receiving messages for this module (program). int i = 100; while(i > 0){ // Run loop (keeps the process in memory) //puts("World module."); sleep(1); i--; } return 0; }
static ChatPage* createChatPage(QWidget* parent = 0) { ChatPage* page = new ChatPage(parent); IrcBufferModel* model = createBufferModel(page); foreach (IrcBuffer* buffer, model->buffers()) page->treeWidget()->addBuffer(buffer); IrcBuffer* buffer = model->find("#magna"); page->addBuffer(buffer); page->splitView()->setCurrentBuffer(buffer); page->treeWidget()->setCurrentBuffer(buffer); page->treeWidget()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); page->currentView()->textBrowser()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); receiveMessages(model, buffer); return page; }
void SynchronousEngine<algorithm_t>::start(){ iteration_counter_ = 0; runSynchronous( &SynchronousEngine::executeInits); while ( iteration_counter_ < max_iterations_ ){ // mark vertex which has message as active in this superstep, no it is // not parallized receiveMessages(); clearMessages(); countActiveVertices(); runSynchronous( &SynchronousEngine::executeGathers); runSynchronous( &SynchronousEngine::executeApplys); runSynchronous( &SynchronousEngine::executeScatters); runSynchronous( &SynchronousEngine::executeAggregate); ++iteration_counter_; } }
void SynchronousEngine<algorithm_t>::start(){ runSynchronous( &SynchronousEngine::executeInits); aggregator->start(); while(true){ // mark vertex which has message as active in this superstep, no it is // not parallized receiveMessages(); clearMessages(); countActiveVertices(); if(num_active_vertices_ == 0){ break; } runSynchronous( &SynchronousEngine::executeGathers); runSynchronous( &SynchronousEngine::executeApplys); runSynchronous( &SynchronousEngine::executeScatters); // probe the aggregator aggregator->tick_synchronous(); ++iteration_counter_; } }
void SV_update(networkUpdate_t *update) { uint i; receiveMessages(update); // Redirect the received messages to targeted clients for (i = 0; i < update->count; i++) { networkMessage_t *message = &update->messages[i]; if (message->type != NETWORK_MESSAGE_HEARTBEAT) { sendMessage(message->type, message->senderID, message->receiverID, message->content); if (message->type == NETWORK_MESSAGE_EXIT) { // Client left dropClient(message->senderID); } } } checkForTimeOuts(); }
void PingServer::run() { // recieve messages receiveMessages(); shutdown(); }
//-------------------------------------------------------------- void DataHandler::update(){ newLocations.clear(); newCharacters.clear(); receiveMessages(); }