GetAcceptExSockaddrs function
The GetAcceptExSockaddrs function parses the data obtained from a call to the AcceptEx function and passes the local and remote addresses to a sockaddr structure.
Syntax
void GetAcceptExSockaddrs(
_In_ PVOID lpOutputBuffer,
_In_ DWORD dwReceiveDataLength,
_In_ DWORD dwLocalAddressLength,
_In_ DWORD dwRemoteAddressLength,
_Out_ LPSOCKADDR *LocalSockaddr,
_Out_ LPINT LocalSockaddrLength,
_Out_ LPSOCKADDR *RemoteSockaddr,
_Out_ LPINT RemoteSockaddrLength
);
Parameters
- lpOutputBuffer [in]
-
A pointer to a buffer that receives the first block of data sent on a connection resulting from an AcceptEx call. Must be the same lpOutputBuffer parameter that was passed to the AcceptEx function.
- dwReceiveDataLength [in]
-
The number of bytes in the buffer used for receiving the first data. This value must be equal to the dwReceiveDataLength parameter that was passed to the AcceptEx function.
- dwLocalAddressLength [in]
-
The number of bytes reserved for the local address information. This value must be equal to the dwLocalAddressLength parameter that was passed to the AcceptEx function.
- dwRemoteAddressLength [in]
-
The number of bytes reserved for the remote address information. This value must be equal to the dwRemoteAddressLength parameter that was passed to the AcceptEx function.
- LocalSockaddr [out]
-
A pointer to the sockaddr structure that receives the local address of the connection (the same information that would be returned by the getsockname function). This parameter must be specified.
- LocalSockaddrLength [out]
-
The size, in bytes, of the local address. This parameter must be specified.
- RemoteSockaddr [out]
-
A pointer to the sockaddr structure that receives the remote address of the connection (the same information that would be returned by the getpeername function). This parameter must be specified.
- RemoteSockaddrLength [out]
-
The size, in bytes, of the local address. This parameter must be specified.
Return value
This function does not return a value.
Remarks
The GetAcceptExSockaddrs function is used exclusively with the AcceptEx function to parse the first data that the socket receives into local and remote addresses. The AcceptEx function returns local and remote address information in an internal format. Application developers need to use the GetAcceptExSockaddrs function if there is a need for the sockaddr structures containing the local or remote addresses.
Windows Phone 8: This function is supported for Windows Phone Store apps on Windows Phone 8 and later.
Windows 8.1 and Windows Server 2012 R2: This function is supported for Windows Store apps on Windows 8.1, Windows Server 2012 R2, and later.
Requirements
|
Minimum supported client |
Windows 8.1, Windows Vista [desktop apps | Windows Store apps] |
|---|---|
|
Minimum supported server |
Windows Server 2003 [desktop apps | Windows Store apps] |
|
Minimum supported phone |
Windows Phone 8 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also