Export (0) Print
Expand All

SOCKADDR structure

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

Syntax


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

Members

sa_family

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

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

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

Ws2def.h (include Wsk.h)

See also

WskAccept
WskBind
WskConnect
WskGetLocalAddress
WskGetRemoteAddress
WskReceiveFrom
WskSendTo
WskSocketConnect
WskAcceptEvent
WskInspectEvent
SOCKADDR_STORAGE
WSK_DATAGRAM_INDICATION

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft