Skip to content

Instantly share code, notes, and snippets.

@Ben-PH
Created October 7, 2019 22:28
Show Gist options
  • Save Ben-PH/109ae77b0cc57d8457676c5d1d860d61 to your computer and use it in GitHub Desktop.
Save Ben-PH/109ae77b0cc57d8457676c5d1d860d61 to your computer and use it in GitHub Desktop.
The meat and bones of setting up a listen queueueueueue
int wait_size = 5; // maximum number of waiting clients
if (listen(listen_sock, wait_size) < 0) {
printf("could not open socket for listening\n");
return 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment