add endpointing for online websocket server (#294)

This commit is contained in:
Fangjun Kuang
2023-08-31 14:41:04 +08:00
committed by GitHub
parent 2b0152d2a2
commit a0a747a0c0
4 changed files with 27 additions and 2 deletions

View File

@@ -194,6 +194,9 @@ void OnlineWebsocketDecoder::Decode() {
for (auto c : c_vec) {
auto result = recognizer_->GetResult(c->s.get());
if (recognizer_->IsEndpoint(c->s.get())) {
recognizer_->Reset(c->s.get());
}
asio::post(server_->GetConnectionContext(),
[this, hdl = c->hdl, str = result.AsJsonString()]() {