Start writing your server code!!
In this video, I have covered about the system calls/functions which are used to initialize a socket environment in C/C++ socket program
Need the header winsock.h and the library to be referred as wsock32.lib.
In case you are writing your code in C/C++ Windows platform (unlike Linux), then you need to use the WSA calls (like WSAStartup ) with WSADATA initialized with the version of your choice and requirement.
Discussed about the struct sockaddr and struct sockaddr_in and how to set the address family with this structure and how to set the port numbers (in Network byte order). How to set your local IP Address with INADDR_ANY as it internally converts the address and assign it to sockaddr_in with network byte order.
After binding, you need to set it to listen on the port for incoming connections!!
Best of luck and
Happy Learning!!!! :)
Download
0 formats
No download links available.
Socket Programming in C, C++ Part 2 (socket, bind, about sockaddr_in, listen etc) | NatokHD