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

Function sendData

libminifi/test/Server.cpp:170–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170int sendData(int socket, uint8_t *buf, int buflen) {
171 int ret = 0, bytes = 0;
172
173 while (bytes < buflen) {
174 ret = send(socket, buf + bytes, buflen - bytes, 0);
175 //check for errors
176 if (ret == -1) {
177 return ret;
178 }
179 bytes += ret;
180 }
181
182 return bytes;
183}
184
185void error(const char *msg) {
186 perror(msg);

Callers 3

mainFunction · 0.85
sendRegisterReqMethod · 0.85
sendReportReqMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected