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

Method OnReceiveData

src/network/core/http_shared.h:48–52  ·  view source on GitHub ↗

* Similar to HTTPCallback::OnReceiveData, but thread-safe. */

Source from the content-addressed store, hash-verified

46 * Similar to HTTPCallback::OnReceiveData, but thread-safe.
47 */
48 void OnReceiveData(std::unique_ptr<char[]> data, size_t length)
49 {
50 std::lock_guard<std::mutex> lock(this->mutex);
51 this->queue.emplace_back(std::move(data), length);
52 }
53
54 /**
55 * Process everything on the queue.

Callers 3

HandleQueueMethod · 0.45
WinHttpCallbackMethod · 0.45
HttpThreadFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected