Multiple Socket Ports Question
I want to write a java japplet application which will handle multiple chat rooms with sockets. There can be 1 or more chat rooms running at a time with 1 or more users in each chat room.
Would each chat room get its own port number that the socket is using? And everyone in that chat room would use the same port number? If so, how would you dynamically choose a port number each time a chat room is created?
I'm aware I probably could use one port number for everything, but this would probably be very inefficient, right?