Socket : A communication bridge between different hosts in the network, the network communication software function that people use is based on socket socket as communication bridge.
Addressing: In Winsock, users can use a unified socket address structure in the TCP/IP address family To resolve problems that may occur in TCP/IP addressing, as defined below
1 struct sockaddr_in{ 2 short sin_family; // 3 unsigned short sin_port; // port number 4 // ip address 5 8 ]; // reserved, need to be specified as 0 6 };
BYTE order: The order in which the data is transferred is based on network byte order and host byte order. From the point of view of data storage, the network is in order to store the most important bytes in the data first, while the host byte order stores the unimportant bytes first.
Winsock provides functions for converting between network byte order and host byte order.
Socket correlation function
1. Constructor Csocket::csocket ();
Exp:csocket sock;
Create a Socket object pointer
CSocket *sock;
Sock=new CSocket;
2. Binding Address Information
Visual C + + Network programming--socket socket programming