| 236 | } |
| 237 | |
| 238 | static cc_result WriteAllToSocket(cc_socket socket, const cc_uint8* data, cc_uint32 count) { |
| 239 | cc_uint32 sent; |
| 240 | cc_result res; |
| 241 | |
| 242 | while (count) |
| 243 | { |
| 244 | if ((res = Socket_Write(socket, data, count, &sent))) return res; |
| 245 | if (!sent) return ERR_END_OF_STREAM; |
| 246 | |
| 247 | data += sent; |
| 248 | count -= sent; |
| 249 | } |
| 250 | return 0; |
| 251 | } |
| 252 | |
| 253 | static cc_result HttpConnection_Read(struct HttpConnection* conn, cc_uint8* data, cc_uint32 count, cc_uint32* read) { |
| 254 | if (conn->sslCtx) |
no test coverage detected