T
T
TheRevan2016-10-30 21:29:31
Java
TheRevan, 2016-10-30 21:29:31

How to reserve the required number of ports?

There are a lot of clients (each time a different number), how to find out how many ports the server should listen on? Set up to listen to all possible? Or is it possible to reserve a port when connected? Is it possible to implement such a structure, if so, how: let's say the Server does not listen to any port, then the client connects and the server assigns port number 6222 to it, the next client connects to port 6223, the next to 6224. The first client disconnects, and port 6222 becomes free , the next client to connect to it.
Or is it even simpler, thousands of clients can be connected to one port at once? But how then can one be distinguished from the other?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
aol-nnov, 2016-10-30
@TheRevan

you need to listen to one port and put things in order in theory as soon as possible.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question