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

Method handle_ws_ping

lib_acl_cpp/src/http/http_aclient.cpp:262–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

260}
261
262bool http_aclient::handle_ws_ping()
263{
264 if (buff_ == NULL) {
265 buff_ = NEW string(1024);
266 }
267
268 while (true) {
269 int ret = ws_in_->peek_frame_data(*buff_, 1024);
270 bool res;
271 switch (ret) {
272 case -1:
273 if (ws_in_->eof()) {
274 buff_->clear();
275 return false;
276 }
277 return true;
278 case 0:
279 this->on_ws_frame_ping(*buff_);
280 if (buff_->empty()) {
281 return true;
282 }
283
284 // �첽���� pong ����
285 res = ws_out_->send_frame_pong(*conn_,
286 (void*) buff_->c_str(), buff_->size());
287 buff_->clear();
288 return res;
289 default:
290 break;
291 }
292 }
293}
294
295bool http_aclient::handle_ws_pong()
296{

Callers

nothing calls this directly

Calls 8

peek_frame_dataMethod · 0.80
send_frame_pongMethod · 0.80
stringClass · 0.50
eofMethod · 0.45
clearMethod · 0.45
emptyMethod · 0.45
c_strMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected