MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / update

Method update

plugins/HTTPServer/HTTPServer.cpp:579–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579void HTTPServer::update(void) {
580 HTTPConnectionMap::iterator itr = liveConnections.begin();
581
582 while (itr != liveConnections.end()) {
583 if (itr->second.update()) {
584 HTTPConnectionMap::iterator i = itr;
585 itr++;
586 bz_removeNonPlayerConnectionHandler(i->first, this);
587 bz_disconnectNonPlayerConnection(i->first);
588 }
589 else {
590 itr++;
591 }
592 }
593
594 if (liveConnections.size()) {
595 bz_setMaxWaitTime(0.01f, "HTTPServer");
596 }
597 else {
598 bz_clearMaxWaitTime("HTTPServer");
599 }
600}
601
602void HTTPServer::generateIndex(int connectionID, const HTTPRequest& request) {
603 HTTPConnectionMap::iterator itr = liveConnections.find(connectionID);

Callers 4

Player_getAttrFunction · 0.45
processMethod · 0.45
generateIndexMethod · 0.45
generatePageMethod · 0.45

Calls 15

bz_setMaxWaitTimeFunction · 0.85
bz_clearMaxWaitTimeFunction · 0.85
HTTPTaskClass · 0.85
bz_sendNonPlayerDataFunction · 0.85
generateBodyMethod · 0.80
formatFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected