MCPcopy Create free account
hub / github.com/acl-dev/acl / readData

Method readData

lib_acl_cpp/samples/http/webSocketServlet/WebsocketServlet_impl.cpp:149–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147}
148
149bool WebsocketServlet_impl::readData(unsigned long long len, acl::string& path)
150{
151 char buf[8192];
152 while (len > 0) {
153 size_t n = len > sizeof(buf) ? sizeof(buf) : len;
154 int ret = readPayload(buf, n);
155 if (ret == -1) {
156 printf("readPayload error\r\n");
157 return false;
158 }
159 path.append(buf, ret);
160 len -= ret;
161 }
162
163 return true;
164}
165
166bool WebsocketServlet_impl::saveFile(unsigned long long len)
167{

Callers

nothing calls this directly

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected