neha
neha

Reputation: 17

Socket programming

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

Answers (2)

Saurabh Gokhale
Saurabh Gokhale

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

SLaks
SLaks

Reputation: 888107

You can close your socket, then open a new one on a different port.

Upvotes: 1

Related Questions