[WEBSOCKET_SPEC-39] WebSocket message handling: Clarify who handles what when there are multiple encoders Created: 17/Oct/12 Updated: 04/Dec/12 Due: 09/Nov/12 Resolved: 04/Dec/12
|Remaining Estimate:||Not Specified|
|Time Spent:||Not Specified|
|Original Estimate:||Not Specified|
The situation is that an endpoint has two onMessage handlers.
For example: One handles Strings, the other handles Apples. There is an AppleEncoder on the endpoint.
Which method gets called ?
|Comment by dannycoward [ 29/Oct/12 ]|
I'm adding the first version of a proposal which I'll send to the expert group. Nothing decided yet.
Each message is handled by at most one message handler
1. a whole string message arrives
a) if there is an MessageHandler.AsyncText handler - call it and stop
e) If the message is unhandled, call back on the onError/@WebSocketError method. We may need a new exception type for Unhandledmessages.
2) a whole binary message arrives: same process as 1).
3 the first piece of a chunked string message arrives.
a) if there is an MessageHandler.AsyncText handler - call it repeatedly until all the message has arrived and stop
4) the first piece of a chinked binary message arrives
same process as 3) but for binary.
|Comment by dannycoward [ 04/Dec/12 ]|
We are restricting the model to being able to configure only one MessageHandler per native websocket message type: text, binary and Pong.