-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Description
Hi,
I'm using this library on Android to communicate with an (old?) Draft_75 server.
I found that long messages from the server were not assembled correctly on the client side.
I'm not a big expert on web sockets, so I'm not even sure Draft_75 is supposed to handle this on the client or how.
Could be a crude hack, but what I ended up doing to get it working was:
// Changes to Draft_75 class
- add a boolean field:
private boolean appending = false; - inside if (readingState) { ... }
curframe.setOptcode ( Opcode.CONTINIOUS ); // instead of TEXT
this.appending = true; - when closing the read on END_OF_FRAME:
curframe.setOptcode ( this.appending ? Opcode.CONTINIOUS : Opcode.TEXT );
this.appending = false;
This makes WebSocket enter the Opcode.CONTINIOUS state when reading such frames,
and when the fin is marked on the last frame part, the message is emitted.
Sorry if this is way off or something, hopefully it will help somehow.
Metadata
Metadata
Assignees
Labels
No labels