MCPcopy Create free account
hub / github.com/brainboxdotcc/DPP / one_second_timer

Method one_second_timer

src/dpp/http_server_request.cpp:250–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void http_server_request::one_second_timer() {
251 if (!tcp_connect_done && time(nullptr) >= timeout) {
252 timed_out = true;
253 this->close();
254 } else if (tcp_connect_done && !connected && time(nullptr) >= timeout && this->state != HTTPS_DONE) {
255 this->close();
256 timed_out = true;
257 } else if (time(nullptr) >= timeout && this->state != HTTPS_DONE) {
258 this->close();
259 timed_out = true;
260 }
261}
262
263std::string http_server_request::get_response() {
264 std::string response = "HTTP/1.0 " + std::to_string(status) + " OK\r\n";

Callers

nothing calls this directly

Calls 1

closeMethod · 0.95

Tested by

no test coverage detected