Skip to content

Added EVENT_ENGINE which is fired when a new engine socket is created.#166

Merged
mattqs merged 1 commit intoQuobject:masterfrom
jeremyhewett:ExposeEngineViaEvent
Jul 25, 2018
Merged

Added EVENT_ENGINE which is fired when a new engine socket is created.#166
mattqs merged 1 commit intoQuobject:masterfrom
jeremyhewett:ExposeEngineViaEvent

Conversation

@jeremyhewett
Copy link
Contributor

This is a small change since the engine is already accessible via socket.Io().EngineSocket. The key difference is that this new event exposes it before it's open allowing application code to use it to subscribe to events like EVENT_TRANSPORT which opens a lot of doors.

My particular use-case is a bit hacky but with this small change I'm able to get hold of the transport layer at application level and add support for the Set-Cookie header allowing us to deploy a SocketIO server behind an AWS load balancer with sticky sessions (based on cookies). GAME CHANGER!

@mattqs mattqs merged commit a52bdf0 into Quobject:master Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants