Microsoft Internet Security and Acceleration Server 2000

IFWXNetworkSocket::GetPeerName Method

Gets the remote address of a socket.

HRESULT GetPeerName(
  LPSOCKADDR Address,
  LPINT AddressLength
);

Parameters

Address
[out] Pointer to the address of a sockaddr structure that receives the address (name) of the peer.
AddressLength
[in, out] On input, specifies the size, in bytes, of the Address buffer. On output, receives the buffer size, in bytes, needed to hold the address.

Remarks

Used when a connection has been requested from outside the network, and you want to identify it. This method is similar to the Winsock getpeername function, which is described in MSDN.

Return Values

S_OK
The method succeeded.
HRESULT_FROM_WIN32(WSAEFAULT)
The name or the namelen parameter is not a valid part of the user address space, or the namelen parameter is too small.