websocket-next access WebSocketConnection outside of @OnOpen or @OnMessage methods #39898
Unanswered
sharpe-developer
asked this question in
Q&A
Replies: 1 comment
-
I have the same question - unsure what the migration of jakarta's would be good to document some patterns for it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Scenario: a websocket-next server accepts a connection from a client and then needs to stream data to the client within a
Runnable
launched within@OnOpen
. The websocket-nextWebSocketConnection
is available in@OnOpen
or@OnMessage
methods but appears to be invalid in theRunnable
context (refer to Access to the WebSocketConnection). How can a websocket-next server access theWebSocketConnection
to send data to the connected client outside of the@OnOpen
or@OnMessage
methods?Beta Was this translation helpful? Give feedback.
All reactions