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:
- Call the close() on all the client FDs, then call the close() on the parent FD.
- Call the close on the parent FD first, then call close() on each the child FDs
- Call the close() on the parent FD is enough