3 ms·
When I read beej’s guide to network programming I was confused when he said you have to call close() even after you call shutdown(). The way I understood it was
by ATMLOTTOBEER 3y ago
When I read beej’s guide to network programming I was confused when he said you have to call close() even after you call shutdown(). The way I understood it was that shutdown gave you granular control to shut down only the reading or writing part of the connection. Reading your comment I am even more lost lol
- halayli 3y agoah yes that's because close() closes the file descriptor but shutdown does not. You can have a socket that is shutdown on both ends that has a valid fd.