rawpython / remi

Python REMote Interface library. Platform independent. In about 100 Kbytes, perfect for your diet.
Apache License 2.0
3.48k stars 401 forks source link

Handle chunked websocket messages #481

Closed rf closed 2 years ago

rf commented 2 years ago

Fixes #480.

This is kind of a messy solution but it works. Open to suggestions on how to do it differently.

dddomodossola commented 2 years ago

@rf I preferred to not use this PR, because a clean solution is to analize the FIN bit of the Websocket protocol. It is to say that Websocket protocol already provides the information about "Message completely sent", and so it is unnecessary to add message length and parse it. I thank you very much for your effort in this bugfix, and I hope you like the FIN bit solution.

rf commented 2 years ago

👍 That sounds good. I recommend putting in the sanity checks for having a valid operation name though. Again thanks for looking into this!