sockaddr structure

The SOCKADDR structure is a generic structure that specifies a transport address.

Syntax

typedef struct sockaddr {
  u_short        sa_family;
  ADDRESS_FAMILY sa_family;
  CHAR           sa_data[14];
} SOCKADDR, *PSOCKADDR, *LPSOCKADDR;

Members

sa_family.#591705123

sa_family.#2662300842

sa_data

An array of 14 bytes that contains the transport address data.

Remarks

The SOCKADDR structure is large enough to contain a transport address for most address families. For a structure that is guaranteed to be large enough to contain a transport address for all possible address families, see SOCKADDR_STORAGE.

A WSK application typically does not access the sa_data member directly. Instead, a pointer to a SOCKADDR structure is normally cast to a pointer to the specific SOCKADDR structure type that corresponds to a particular address family.

Requirements

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

See Also

SOCKADDR_STORAGE

WSK_DATAGRAM_INDICATION

WskAccept

WskAcceptEvent

WskBind

WskConnect

WskGetLocalAddress

WskGetRemoteAddress

WskInspectEvent

WskReceiveFrom

WskSendTo

WskSocketConnect