| 61 | } |
| 62 | |
| 63 | static void SendAll(dmSSLSocket::Socket ssl_socket, const char* buffer, uint32_t length) |
| 64 | { |
| 65 | uint32_t total_sent = 0; |
| 66 | uint64_t start = dmTime::GetMonotonicTime(); |
| 67 | while (total_sent < length) |
| 68 | { |
| 69 | int sent = 0; |
| 70 | dmSocket::Result result = dmSSLSocket::Send(ssl_socket, buffer + total_sent, length - total_sent, &sent); |
| 71 | if (result == dmSocket::RESULT_WOULDBLOCK) |
| 72 | { |
| 73 | ASSERT_LT(dmTime::GetMonotonicTime() - start, 5 * 1000000ULL); |
| 74 | dmTime::Sleep(1000); |
| 75 | continue; |
| 76 | } |
| 77 | |
| 78 | ASSERT_EQ(dmSocket::RESULT_OK, result); |
| 79 | ASSERT_GT(sent, 0); |
| 80 | total_sent += sent; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | static void SendString(dmSSLSocket::Socket ssl_socket, const char* buffer) |
| 85 | { |
no test coverage detected