What is the difference between an ordinary socket and a TCP socket?. Also in a web server like IIS, how many TCP sockets can be created in a server?. I had read somewhere that when the client connects to a web server(on port 80), the web server creates a temporary port and replies to the client on the temporary port. Is that true ?.
Share
As Andrew mentioned, socket is just an interface. Think about plug and socket; where socket is an external interface for the plug.
Now imagine a socket inside the computer and a plug coming from the outside world, plugged into that socket – that is, connected; now they would need to tell each other how they would communicate(that is, the protocol). The standard forms of protocol are TCP or UDP. See introduction to TCPIP.
An OS can have up to 65536 ports; in windows up to 1024 are reserved by OS for itself.
Yes, it is correct that a server(including IIS) takes on the initial request and forwards the connection to a redirected port. Worth a a glimpse link. Also, see performance tuning section if you want to limit connections to IIS.