Last active
July 23, 2019 04:31
-
-
Save kkumar-fk/ad4abdd60c0b5c9295b61b1d64b16b9a 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
server.sin_family = AF_INET; | |
server.sin_port = htons(SERVER_PORT); | |
bcopy(server_ent->h_addr, &server.sin_addr.s_addr, server_ent->h_length); | |
/* Connect to server, and set the socket's destination IP address and port# | |
* based on above parameters. Also, request the kernel to automatically set | |
* the Source IP and port# if the application did not call bind() prior to connect(). | |
*/ | |
connect(fd, (struct sockaddr *)&server, sizeof server); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment