MCPcopy Create free account
hub / github.com/Codesire-Deng/co_context / memwrite

Function memwrite

test/httpd.cpp:109–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109void memwrite(std::span<char> &buf, std::string_view content) {
110 assert(buf.size() >= content.size());
111 std::memcpy(buf.data(), content.data(), content.size());
112 buf = {buf.begin() + ssize_t(content.size()), buf.end()};
113}
114
115/*
116 * Sends the HTTP 200 OK header, the server string, for a few types of files, it

Callers 1

prep_headersFunction · 0.70

Calls 3

beginMethod · 0.80
endMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected