On 03/04/2013 14:16, Joakim Erdfelt wrote:
> A scenario for the group to ponder.
>
> 1. You have a ChatEndpoint extends Endpoint class.
> 2. WebSocket has been upgraded
> 3. Remote starts immediately sending text frames/messages.
> 4. Endpoint.onOpen(Session session, EndpointConfig config) is called.
> 5. ChatEndpoint.onOpen() performs a session.addMessageHandler(new
> ChatMessageHandler()) call.
>
> If the implementation starts pushing those received messages as it gets
> them, then this gap of time between the open and
> session.addMessageHandler() can result in lost messages.
>
> Is there a requirement in the spec somewhere that says processing of
> received messages should not start until the Endpoint.onOpen (or
> @OnOpen) call has completed?
> Would seem to make sense.
+1
Mark