Last active
April 3, 2016 23:56
-
-
Save jbenner-radham/4c18bd77b94d674b551873d9aebbadae to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| struct sockaddr_in server_addr = { | |
| .sin_family = AF_INET, // Address family | |
| .sin_addr.s_addr = htonl(INADDR_ANY), // Any incoming address | |
| .sin_port = htons(server_port) // Local server port | |
| }; | |
| memset(&server_addr.sin_zero, 0, sizeof(server_addr.sin_zero)); | |
| bind(server_sock, (struct sockaddr*)&server_addr, sizeof(server_addr)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment