Syntax
struct sockaddr_in {
unsigned short sin_family;
unsigned short sin_port;
in_addr sin_addr;
unsigned char sin_zero[8];
};
Members
- sin_family
-
Specifies the address family (AF).
Please specify AF_INET. - sin_port
-
Specify the port number.
Network sockets are identified by a pair of IP addresses and port number.
It must be set in the Network Byte Order format , _htons (e.g. _htons(80)).
Can NOT have zero value. - sin_addr
- Specify the IP address with in_addr structure. Can be set to "0" to accept any IP address for server operation. non zero otherwise.
- sin_zero[8]
- For internal use of the OS only.
Requirements
Header file:
lib.hLibrary file:
libSTARTUPOPH5000.a
Last updated: 2020/11/26