node.js - Socket.IO + Express: Obtaining the socket associated with an express session -


i looking raise application wide events express http route handlers. e.g user modifies record , event emitted other interested users.

in cases want broadcast clients except client making (http) request. possible broadcasting against socket wish exclude, not have access socket associated session authenticating http request.

i have seen examples demonstrate how retrieve express session user socket request (i.e obtain session id cookie, retrieve session sessionstore).

is possible work in inverse , perhaps store socketid against session later retrieval? can identify immediate caveats or gotchas approach?

also there implications if sockets distributed across servers via redis store? can foresee scenario in per user, http requests coming in different node socket requests.

many thanks!


Comments

Popular posts from this blog

C# random value from dictionary and tuple -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -

cgi - How do I interpret URLs without extension as files rather than missing directories in nginx? -