| 184 | } |
| 185 | |
| 186 | static dmSocket::Result SendAll(dmSocket::Socket socket, const char* buffer, int length) |
| 187 | { |
| 188 | int total_sent_bytes = 0; |
| 189 | int sent_bytes = 0; |
| 190 | |
| 191 | while (total_sent_bytes < length) |
| 192 | { |
| 193 | dmSocket::Result r = dmSocket::Send(socket, buffer + total_sent_bytes, length - total_sent_bytes, &sent_bytes); |
| 194 | if (r == dmSocket::RESULT_TRY_AGAIN) |
| 195 | continue; |
| 196 | |
| 197 | if (r != dmSocket::RESULT_OK) |
| 198 | { |
| 199 | return r; |
| 200 | } |
| 201 | |
| 202 | total_sent_bytes += sent_bytes; |
| 203 | } |
| 204 | |
| 205 | return dmSocket::RESULT_OK; |
| 206 | } |
| 207 | |
| 208 | static void dmLogUpdateNetwork() |
| 209 | { |
no test coverage detected