hapi-plugin-websocket icon indicating copy to clipboard operation
hapi-plugin-websocket copied to clipboard

Allow access to server from WebSocket event handlers

Open joshkel opened this issue 2 years ago • 0 comments

I'm looking for a way to access shared server state from hapi-plugin-websocket's lower-level event handlers (connect, disconnect, and error). For a normal request, I could access this via request.server.app, but that's not an option for these event handlers.

Can/should they be extended to, e.g., offer server or app within the PluginState object or as an additional parameter?

joshkel avatar Jun 28 '23 18:06 joshkel