vbmithr / ocaml-websocket

Websocket library for OCaml
ISC License
161 stars 44 forks source link

Frame continuation ops code closes the websocket pipe reader prematurely. #133

Open struktured opened 6 months ago

struktured commented 6 months ago

The react function, which is called upon each frame received, closes the pipe if the ops code is one of Opscode.Continuation | Opscode.Nonctrl _ | Opscode.Ctrl _, as defined here: https://github.com/vbmithr/ocaml-websocket/blob/master/async/websocket_async.ml#L172.

For the Opscode.Continuation case, it should properly implement the websocket protocol to concatenate the fragments. See this helpful blog post for more on the subject.

vbmithr commented 6 months ago

Yo @struktured Please use https://github.com/deepmarker/ocaml-fastws I haven't touched this code for ages, while I use the latter in production. It has the feature you need, BTW. Best, Vincent