I am writing a socket program with Java and have a host that clients can connect. That host has a constant ip and port , if it possible n client connect to server with that ip and port? or do I have to define unique port for each client?
I am writing a socket program with Java and have a host that clients
Share
You can connect many clients as you like ( ok limited by ephemeral socket range ) to a server, all clients will connect to the port the server opens its socket on.
Each client will get its own port at its end but the sockets will sort all that out for you.
For interest ephemeral socket ranges are here Wikipedia