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.
Hinweis This function is a Microsoft-specific extension to the Windows Sockets specification.
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
);
Parameter
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.
Rückgabewert
This function does not return a value.
Hinweise
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.
Hinweis The function pointer for the GetAcceptExSockaddrs function must be obtained at run time by making a call to the WSAIoctl function with the SIO_GET_EXTENSION_FUNCTION_POINTER opcode specified. The input buffer passed to the WSAIoctl function must contain WSAID_GETACCEPTEXSOCKADDRS, a globally unique identifier (GUID) whose value identifies the GetAcceptExSockaddrs extension function. On success, the output returned by the WSAIoctl function contains a pointer to the GetAcceptExSockaddrs function. The WSAID_GETACCEPTEXSOCKADDRS GUID is defined in the Mswsock.h header file.
Anforderungen
Mindestens unterstützter Client |
Windows 2000 Professional |
Mindestens unterstützter Server |
Windows 2000 Server |
Header |
Mswsock.h |
Bibliothek |
Mswsock.lib |
DLL |
Mswsock.dll |