MCPcopy Create free account
hub / github.com/defold/defold / SlurpHttpContent

Method SlurpHttpContent

engine/engine/src/engine_service.cpp:113–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 }
112
113 static void SlurpHttpContent(dmWebServer::Request* request)
114 {
115 char buf[256];
116 uint32_t total_recv = 0;
117
118 while (total_recv < request->m_ContentLength)
119 {
120 uint32_t recv_bytes = 0;
121 uint32_t to_read = dmMath::Min((uint32_t) sizeof(buf), request->m_ContentLength - total_recv);
122 dmWebServer::Result r = dmWebServer::Receive(request, buf, to_read, &recv_bytes);
123 if (r != dmWebServer::RESULT_OK)
124 return;
125 total_recv += recv_bytes;
126 }
127 }
128
129 static void PostHandler(void* user_data, dmWebServer::Request* request)
130 {

Callers

nothing calls this directly

Calls 2

MinFunction · 0.85
ReceiveFunction · 0.50

Tested by

no test coverage detected