What is socket inheritance? Explain.
Socket Inheritance:
In a socket inheritance a reference count mechanism is utilized. Whenever a socket is first created, the system sets the reference of socket count to 1; the socket exists as long as the reference count keeps positive. While a program creates any additional thread, the system gives the thread with a list of all the sockets which program owns, and increments the reference count of each through 1. while a thread calls close for a socket, the system decrements the reference count upon the socket through 1 and removes the socket from the list of thread.
The major thread of a concurrent server creates the socket which the server uses to accept incoming connections. While a connection request arrives, the system makes a new socket for the new connection. When a service thread finishes, this calls close on the new socket.