jboss - How To find a WebSocket from a REST bean -


i have javascript client connects server via websockets , sends data via ajax server. once server finished processing data, want send message via websocket client. problem is: how find websocket rest bean (hopefully in same session...)

a websocket connection starts http handshake. on handshake receive cookies (e.g. session id cookie) access http session.

from jsr 356 java api websocket spec:

because websocket connections initiated http request, there association between httpsession under client operating , websockets established within httpsession. api allows access in opening handshake unique httpsession corresponding same client.

that's point associate http session websocket connection in whatever way find fit.


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -