Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] nested websocket response

Hi Lee,

Yes this is exactly how it is supposed to work. In a specific websocket connection the messages are delivered with a single thread at a time, that thread must return from its "on" method before the next message can arrive. Without this you could get out of order message delivery as new messages could arrive while you are still processing a previous one.

cheers,
Lachlan

On Fri, Nov 5, 2021 at 8:17 AM Lee Breisacher <leebreisacher@xxxxxxxxx> wrote:
I want to know if this is do-able:

1. Send a websocket message.
2. In the "on" method handling the response, send another websocket message (to the same websocket as #1).
3. Receive a response to that second message.

I've tried this and the second response does not seem to get handled until I return from the "on" method for the first response, as if there is just one thread handling responses. 

Is that how it is designed to work? Can I tweak some setting to make this work?

Thanks,

Lee
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users

Back to the top