Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

SOCKADDR structure (ws2def.h)

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

Syntax

typedef struct sockaddr {
#if ...
 u_short sa_family;
#else
 ADDRESS_FAMILY sa_family;
#endif
 CHAR sa_data[14];
} SOCKADDR, *PSOCKADDR, *LPSOCKADDR;

Members

sa_family

The address family for the transport address. For more information about supported address families, see WSK Address Families.

sa_data[14]

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

Requirement Value
Minimum supported client 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


Feedback

Was this page helpful?

Additional resources