MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HTTPReceive

Method HTTPReceive

src/network/core/http_curl.cpp:107–123  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

105}
106
107/* static */ void NetworkHTTPSocketHandler::HTTPReceive()
108{
109 std::lock_guard<std::mutex> lock(_http_callback_mutex);
110
111 {
112 std::lock_guard<std::mutex> lock_new(_new_http_callback_mutex);
113 if (!_new_http_callbacks.empty()) {
114 /* We delay adding new callbacks, as HandleQueue() below might add a new callback. */
115 _http_callbacks.insert(_http_callbacks.end(), _new_http_callbacks.begin(), _new_http_callbacks.end());
116 _new_http_callbacks.clear();
117 }
118 }
119
120 for (auto &callback : _http_callbacks) {
121 callback->HandleQueue();
122 }
123}
124
125void CurlSetOption(CURL *curl, auto option, auto value)
126{

Callers

nothing calls this directly

Calls 6

HandleQueueMethod · 0.80
emptyMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected