| 443 | |
| 444 | |
| 445 | bool 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 |
nothing calls this directly
no test coverage detected