According to the received request, the Web server sends response information to the client. When the WEB container is closed, it will be destroyed. When is 44? Create and destroy session objects?
When users access the network. Container, after the container calls the request.getSession () method, it is assumed that the web server process opens port number 80 (that is, listening port number 80), and then the client browser opens any port to initiate a TCP connection request, and the server 80 port monitor receives the request and establishes a TCP connection.
A port can only be bound to one socket at a time. In other words, a port can only have one listening thread at a time.
Why can a port establish multiple TCP connections? The same port means that the server ip and server port remain the same. So as long as [client ip and client port] are different. The uniqueness of the unique identifier [server IP, server port, client IP, client port] can be guaranteed.
The port number is not the unique identification of the socket. In addition, UDP socket is (destination ip address, destination port number).