Last active
March 5, 2020 01:18
-
-
Save kunigami/eda7d26031d01f80bc4203aa475ba3e4 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
hints.ai_family = AF_INET6; | |
hints.ai_socktype = SOCK_STREAM; | |
// Important! Fill in my IP for me | |
hints.ai_flags = AI_PASSIVE; | |
// Use the address from localhost | |
getaddrinfo(NULL, "3490", &hints, &res); | |
sockfd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); | |
bind(sockfd, res->ai_addr, res->ai_addrlen); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment