Closed chemicstry closed 4 years ago
Hi Jurgis, thank you for raising this bug! I took a look at the code and, although it fixes the issue, I think this can be fixed without a minor version change like the one you are proposing (unfortunately, adding a new item to an enum in rust is a breaking change to an api). The continuation frame should be a hidden internal implementation detail anyway and we just need to keep track of the end_of_message
flag the user passes. I have an idea about how to solve this where it will only be a patch version change.
Ok, this should now be fixed, thanks again for reporting it and I'm sorry I couldn't use your PR. I do welcome PRs but in this case the approach was totally different. I have published a new version on crates.io too.
The
WebSocket::write
documentation explains how to send fragmented packets, however, it does not mention that each subsequent message must haveContinuationFrame
opcode, which is not exposed.This PR exposes it so a valid fragmented frame can be constructed.