| 168 | } |
| 169 | |
| 170 | void WebSocketServerImpl::onMessage(websocketpp::connection_hdl hdl, WebSocketPPServer::message_ptr msg) { |
| 171 | auto connection = connectionFromHandle(hdl); |
| 172 | if (connection != nullptr) { |
| 173 | auto bytes = makeShared<Bytes>(); |
| 174 | bytes->assignData(reinterpret_cast<const Byte*>(msg->get_payload().data()), msg->get_payload().size()); |
| 175 | connection->dataReceived(BytesView(bytes)); |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | void WebSocketServerImpl::onHttp(websocketpp::connection_hdl hdl) { |
| 180 | auto con = _server.get_con_from_hdl(hdl); |
nothing calls this directly
no test coverage detected