sockaddr_in structure

The SOCKADDR_IN structure specifies a transport address and port for the AF_INET address family.

Syntax

typedef struct sockaddr_in {
#if ...
  short          sin_family;
#else
  ADDRESS_FAMILY sin_family;
#endif
  USHORT         sin_port;
  IN_ADDR        sin_addr;
  CHAR           sin_zero[8];
} SOCKADDR_IN, *PSOCKADDR_IN;

Members

sin_family.#1931124374

sin_family.#3073272964

sin_port

A transport protocol port number.

sin_addr

An IN_ADDR structure that contains an IPv4 transport address.

sin_zero

Reserved for system use. A WSK application should set the contents of this array to zero.

Remarks

All of the data in the SOCKADDR_IN structure, except for the address family, must be specified in network-byte-order (big-endian).

Requirements

   
Minimum supported client Available in Windows Vista and later versions of the Windows operating systems.
Header ws2def.h (include Wsk.h)

See Also

AF_INET

IN_ADDR

SOCKADDR

SOCKADDR_STORAGE