Whenever a traditional Server accepts a new connection, it needs to create a new process to maintain the connection. does this process need to use a new port?

  node.js, question

For example, it seems that there are not many answers found on the Internet. Isn’t reasoning a process recognized by a port number? The ip and port of the server should also be fixed.

In addition, like node.js, every time a new connection comes, it is an event. how do you identify which event belongs to a client?

Since BSD Socket, the network port is a file for application programmers. The operating system is also very similar to a file in management. The operating permissions of the file are shared by parent-child processesfork()Had that socket before, thenfork()Later subprocesses can also use the same port.
The new connection does not have the problem you mentioned. It should be how the existing connection sends data to determine which connection the data is from. This bottom layer is implemented by IP protocol. The operating system can also reverse the data packets from that connection. nodejs uses asynchronous method, and this is implemented by the operation provided by operating system such as epoll. The operating system will tell nodejs which connection the new data comes from, and then nodejs will process it again.