| 220 | } |
| 221 | |
| 222 | int 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 | } |
| 239 | int SocketReceive(SOCKET sck, char* destination, size_t size) |
| 240 | { |
| 241 | int allSize = (int)size; |
no outgoing calls
no test coverage detected