TakahikoKawasaki / nv-websocket-client

High-quality WebSocket client implementation in Java.
Apache License 2.0
2.03k stars 292 forks source link

Send Binery Proirity #131

Closed saeedmozaffari closed 5 years ago

saeedmozaffari commented 7 years ago

Hi, I am looking for a way to give priority to sending binery messages.

Now , I'm trying to ask my question better. I have a messenger . my user uploading a chunk of file with size 1 Mb (for example : complete file size is 5 Mb) with sendBinery() ; then before this chunk is sent to the server ( onFrameSent() ), sends a simple text message with 10 byte size. now we should waiting for send file chunk and after than can send simple text.

is there any way that for this conditions we send simple text in parallel state with file chunk and don't wait for upload file; of course just in one connection?

saeedmozaffari commented 6 years ago

There is any solution?

eku commented 6 years ago

@saeedmozaffari AFAIK out of band messages are not supported.

TakahikoKawasaki commented 6 years ago

@saeedmozaffari Control frames can be interleaved into data frames. However, data frames cannot be interleaved into data frames. This is a limitation of the specification (RFC 6455). You need two WebSocket connections if you want to support the use case.