Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dispose and recreate socket? #69

Open
DJDaveMark opened this issue Jul 25, 2018 · 0 comments
Open

How to dispose and recreate socket? #69

DJDaveMark opened this issue Jul 25, 2018 · 0 comments

Comments

@DJDaveMark
Copy link

Hi,

I'd like some pointers on how to dispose and recreate the socket connection.
At the moment, in the AppModule I have SocketIoModule.forRoot(socketConfig), and a single page/component which uses a service which has the Socket class injected via it's contructor.
The service obviously stays around as soon as it's instantiated for the first time, by navigating to the page.

Does anyone have any advice or example code to dispose & recreate the socket?
Or another pattern like creating/disposing a new socket which follows the life-cycle of a component?

Cheers

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

No branches or pull requests

1 participant