Reputation: 542
After the creation the server socket we get the parent FD. Once the parent FD is used to accept the client(s) connections it will create further child FD(s).
So when calling the close() what is the best practice:
Upvotes: 2
Views: 942
Reputation: 3704
Taking the web server definition of graceful closing and boiling it down to just TCP, you would get the following:
Basically, you are giving the priority to the existing active connections and trying to forcefully close the least amount of them.
Upvotes: 1