Created
July 23, 2019 04:04
-
-
Save kkumar-fk/6e5af42620cbae8307c307d5c4b2b805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const struct linger opt = { .l_onoff = 1, .l_linger = 0 }; | |
setsockopt(fd, SOL_SOCKET, SO_LINGER, &opt, sizeof opt); | |
close(fd); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment