Reputation: 17
Is it possible to change the port of the server to which it is listening, when client sends a message to change?
Upvotes: 0
Views: 310
Reputation: 46425
Yes. It is possible.
You can do it by simply terminating the socket on that port and starting a new one on any different port.
Upvotes: 0
Reputation: 888107
You can close your socket, then open a new one on a different port.
Upvotes: 1