MCPcopy Create free account
hub / github.com/acl-dev/acl / handle_ws_data

Method handle_ws_data

lib_acl_cpp/src/http/http_aclient.cpp:344–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344bool 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
368bool http_aclient::handle_websocket()
369{

Callers

nothing calls this directly

Calls 4

peek_frame_dataMethod · 0.80
eofMethod · 0.45
on_ws_frame_finishMethod · 0.45
on_ws_frame_dataMethod · 0.45

Tested by

no test coverage detected