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

Method doPong

lib_acl_cpp/samples/websocket/upload_server/http_servlet.cpp:129–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129bool http_servlet::doPong(acl::websocket& in, acl::websocket&)
130{
131 unsigned long long len = in.get_frame_payload_len();
132 if (len == 0)
133 return true;
134
135 char buf[8192];
136 while (true)
137 {
138 int ret = in.read_frame_data(buf, sizeof(buf) - 1);
139 if (ret == 0)
140 break;
141 if (ret < 0)
142 {
143 printf("read_frame_data error\r\n");
144 return false;
145 }
146
147 buf[ret] = 0;
148 printf("read: [%s]\r\n", buf);
149 }
150
151 return true;
152}
153
154bool http_servlet::doClose(acl::websocket&, acl::websocket&)
155{

Callers

nothing calls this directly

Calls 1

read_frame_dataMethod · 0.80

Tested by

no test coverage detected