sockaddr_in Structure

C

struct sockaddr_in {
    short sin_family;
    uint16_t sin_port;
    struct in_addr sin_addr;
    char sin_zero[8];
};

Description

In the Internet address family.

Members

MembersDescription
sin_familyAddress family; must be AF_INET.
sin_portInternet Protocol (IP) port.
sin_addrIP address in network byte order.
sin_zero[8]Padding to make structure the same size as SOCKADDR.