| 342 | } |
| 343 | |
| 344 | bool http_aclient::handle_ws_data() |
| 345 | { |
| 346 | char buf[8192]; |
| 347 | size_t size = sizeof(buf) - 1; |
| 348 | |
| 349 | while (true) { |
| 350 | int ret = ws_in_->peek_frame_data(buf, size); |
| 351 | switch (ret) { |
| 352 | case -1: |
| 353 | if (ws_in_->eof()) { |
| 354 | return false; |
| 355 | } |
| 356 | return true; |
| 357 | case 0: |
| 358 | return this->on_ws_frame_finish(); |
| 359 | default: |
| 360 | if (!this->on_ws_frame_data(buf, ret)) { |
| 361 | return false; |
| 362 | } |
| 363 | break; |
| 364 | } |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | bool http_aclient::handle_websocket() |
| 369 | { |
nothing calls this directly
no test coverage detected