MCPcopy Create free account
hub / github.com/JosephP91/curlcpp / read_memory_callback

Function read_memory_callback

include/curl_ios.h:47–52  ·  view source on GitHub ↗

Default in-memory read callback.

Source from the content-addressed store, hash-verified

45
46 // Default in-memory read callback.
47 size_t read_memory_callback(void *contents, size_t size, size_t nmemb, void *userp) {
48 const size_t realsize = size * nmemb;
49 auto* const mem = static_cast<std::istream*>(userp);
50 mem->read(static_cast<char*>(contents), realsize);
51 return static_cast<size_t>(mem->gcount());
52 }
53}
54
55namespace curl {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected