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

Method Receive

src/network/core/http_winhttp.cpp:266–276  ·  view source on GitHub ↗

* Poll and process the HTTP request/response. * * @return True iff the request is done; no call to Receive() should be done after it returns true. */

Source from the content-addressed store, hash-verified

264 * @return True iff the request is done; no call to Receive() should be done after it returns true.
265 */
266bool NetworkHTTPRequest::Receive()
267{
268 if (this->callback.cancelled && !this->finished) {
269 Debug(net, 1, "HTTP request failed: cancelled by user");
270 this->callback.OnFailure();
271 this->finished = true;
272 /* Fall-through, as we are waiting for IsQueueEmpty() to happen. */
273 }
274
275 return this->finished && this->callback.IsQueueEmpty();
276}
277
278/**
279 * Destructor of the HTTP request.

Callers 1

HTTPReceiveMethod · 0.45

Calls 2

IsQueueEmptyMethod · 0.80
OnFailureMethod · 0.45

Tested by

no test coverage detected