In a Socket communication when a server accepts a connection, it returns a value which is always greater than 0 if the connection is successful.
ConnectedSocket = accept(sock_desc, (struct sockaddr *)&echoClntAddr,(socklen_t*)&clntSock);
Consider a client connected to the server and a server with the number 1 assigned. Then the client gets disconnected, and after some time another client connects. Will the accept function assign it the number 1 or number 2?
If the accept function will assign number 2, then after how many connections will number 1 be assigned again?