GetPeerName Method of the IFWXNetworkSocket Interface

The GetPeerName method retrieves the remote name of a socket. This method is similar to the Winsock getpeername function.

Syntax

HRESULT GetPeerName(
  [out]  LPSOCKADDR Address,
  [out]  LPINT AddressLength
);

Parameters

Address

Pointer to a sockaddr structure that receives the address (name) of the peer.

AddressLength

On input, specifies the size, in bytes, of the Address buffer. On output, receives the buffer size, in bytes, needed to hold the address.

Return Value

This method returns S_OK if the call is successful; otherwise, it returns an error code.

Remarks

This method is used when a connection has been requested from outside the network, and you want to identify it.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXNetworkSocket


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.