MCPcopy Create free account
hub / github.com/apache/nifi-minifi-cpp / readData

Function readData

libminifi/test/Server.cpp:238–256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238int readData(int socket, uint8_t *buf, int buflen) {
239 int sendSize = buflen;
240 int status;
241
242 while (buflen) {
243#ifndef __MACH__
244 status = read(socket, buf, buflen);
245#else
246 status = recv(socket, buf, buflen, 0);
247#endif
248 if (status <= 0) {
249 return status;
250 }
251 buflen -= status;
252 buf += status;
253 }
254
255 return sendSize;
256}
257
258int readHdr(int socket, FlowControlProtocolHeader *hdr) {
259 uint8_t buffer[sizeof(FlowControlProtocolHeader)];

Callers 5

readHdrFunction · 0.70
mainFunction · 0.70
readHdrMethod · 0.50
sendRegisterReqMethod · 0.50
sendReportReqMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected