MCPcopy Create free account
hub / github.com/cuberite/cuberite / SendData

Method SendData

Tools/ProtoProxy/Connection.cpp:445–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443
444
445bool cConnection::SendData(SOCKET a_Socket, const char * a_Data, size_t a_Size, const char * a_Peer)
446{
447 DataLog(a_Data, a_Size, "Sending data to %s, %u bytes", a_Peer, (unsigned)a_Size);
448
449 int res = send(a_Socket, a_Data, (int)a_Size, 0);
450 if (res <= 0)
451 {
452 Log("%s closed the socket: %d, %d; aborting connection", a_Peer, res, SocketError);
453 return false;
454 }
455 return true;
456}
457
458
459

Callers

nothing calls this directly

Calls 3

ReadAllMethod · 0.80
CommitReadMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected