Reputation: 974
I am trying to make a simple TCP
chat program, and I want the user to be able to start the program, then be able to enter a specific ip
to connect to, and then disconnect from that specific server, and then connect to another after that.
I know that the client is connected once it runs client.connect(timeout, ip, port)
, but the only way I know of to disconnect the client from the server is by exiting the program.
Is there any way to do this?
Upvotes: 0
Views: 709