MCPcopy Create free account
hub / github.com/WheretIB/nullc / SocketSend

Function SocketSend

NULLC/nullc_remote.h:222–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

220}
221
222int SocketSend(SOCKET sck, char* source, size_t size)
223{
224 int allSize = (int)size;
225 while(size)
226 {
227 int bytesSent;
228 if((bytesSent = send(sck, source + (allSize - size), (int)size, 0)) == NULLC_SOCKET_ERROR || bytesSent == 0)
229 {
230 printf("send failed\n");
231 return -1;
232 }
233 size -= bytesSent;
234 if(size)
235 printf("Partial send\n");
236 }
237 return allSize;
238}
239int SocketReceive(SOCKET sck, char* destination, size_t size)
240{
241 int allSize = (int)size;

Callers 3

PipeSendDataFunction · 0.70
PipeDebugBreakFunction · 0.70
GeneralCommandThreadFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected