Answer the question
In order to leave comments, you need to log in
How to restart socket io on client side with changed parameters?
All the best! How to implement so that when you change the port or host, sokcet of the server on the client side, you can change the settings on the client side and restart the socket?
Answer the question
In order to leave comments, you need to log in
Without punctuation, it's just a loosely connected stream of consciousness.
Port/host changes on the server, but restart the client?
1. Send emit to all clients from the old socket server. For example, 'reconnect' and a new address
2. Stop the old socket server (you don't have to stop)
3. Start a new socket server
4. On the client, make sure that when 'reconnect' is received, the old connection is closed and a new one is opened
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question