简体   繁体   中英

TCP Socket communication of HTTP client and server

Just some concept about TCP Socket, let's say there are 100 clients simultaneously communicating with a traditional HTTP/TCP web server. How many sockets are respectively at the server and at each client? Do all of the sockets at the server have the same server-side port number?

The question is generic, so the answer is going to be as well.

For traditional TCP-based HTTP server, there will be 100 sockets on the server (one for each client), and one socket on every client. All server sockets will be bound to the same server port.

This answer doesn't take into account the fact that in modern HTTP model a client usually opens more than one socket to serve a single request.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM