| 218 | } |
| 219 | |
| 220 | cc_result SSL_Read(void* ctx_, cc_uint8* data, cc_uint32 count, cc_uint32* read) { |
| 221 | SSLContext* ctx = (SSLContext*)ctx_; |
| 222 | // TODO: just br_sslio_write ?? |
| 223 | int res = br_sslio_read(&ctx->ioc, data, count); |
| 224 | if (res < 0) return SSL_GetError(ctx); |
| 225 | |
| 226 | br_sslio_flush(&ctx->ioc); |
| 227 | *read = res; |
| 228 | return 0; |
| 229 | } |
| 230 | |
| 231 | cc_result SSL_WriteAll(void* ctx_, const cc_uint8* data, cc_uint32 count) { |
| 232 | SSLContext* ctx = (SSLContext*)ctx_; |
no test coverage detected