IFWXConnection::GetExternalSocketName method
Applies to: desktop apps only
The GetExternalSocketName method gets the socket name for the external socket. This method is implemented by calling the Winsock getsockname function on the actual external socket.
Syntax
HRESULT GetExternalSocketName(
[out] LPSOCKADDR Address,
[in, out] LPINT AddressLength
);
Parameters
Address [out]
Pointer to a sockaddr structure that receives the socket address (name).AddressLength [in, out]
On input, this parameter specifies the size, in bytes, of the Address buffer. On output, it receives the size, in bytes, needed to hold the address.
Return value
This method can return one of these values.
S_OK
The method succeeded.E_OUTOFMEMORY
Not enough memory or resources could be allocated to complete the operation.FWX_E_TERMINATING
The object is shutting down.HRESULT_FROM_WIN32(WSAEFAULT)
The name or namelen parameter is not a valid part of the user address space, or the namelen parameter is too small.HRESULT_FROM_WIN32(WSAEINVAL)
The socket has not been bound to an address using the bind function.
Remarks
This method should not be called from the session event handling portion of your filter code. At that point in the code, the network connection has not been established yet, and may be denied by the application filter or by another application filter. Typically you would call this method from within the IFWXDataFilter::SetSockets method of a data filter attached to the connection; that is, at a point when you are certain that the connection has been established.
Requirements
Minimum supported client |
None supported |
Minimum supported server |
Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only) |
Version |
Forefront Threat Management Gateway (TMG) 2010 |
Header |
Wspfwext.idl |
DLL |
Wspsrv.exe |
See also
Build date: 7/12/2010