Поделиться через


IRTCClient::NetworkAddresses (Windows Embedded CE 6.0)

1/6/2010

This method gets the IP addresses and ports that the client is listening on. These addresses can be for the following:

  • Local machines
  • The external edges of the Network Address Translator (NAT) boxes

This method supports clients that have out-of-band channels for communicating the local IP addresses and ports to remote callers.

Syntax

HRESULT get_NetworkAddresses(
  VARIANT_BOOL fTCP,
  VARIANT_BOOL fExternal,
  VARIANT* pvAddresses
);

Parameters

  • fTCP
    [in] VARIANT_TRUE if the method gets the IP port addresses used by TCP.

    VARIANT_FALSE if the method gets the UDP addresses.

  • fExternal
    [in] VARIANT_TRUE if the method gets the addresses of the external edges of the NAT boxes.

    VARIANT_FALSE if the method gets the local addresses.

  • pvAddresses
    [out] Pointer to a variant containing a safe array of BSTRs.

    Each BSTR is in the format xxx.xxx.xxx.xxx:nnnnn.

    The caller is responsible for freeing the variant.

Return Value

This method can return an RTC_E_ constant.

Remarks

To call the NetworkAddresses method, use the following algorithm:

  1. Call get_NetworkAddresses with fExternal set to VARIANT_TRUE.
    If this gets an address, communicate this address and port out of band to the called party.
    If more than one address is retrieved, the user must choose the correct address based on the destination.
  2. If step 1 does not retrieve any addresses, call get_NetworkAddresses with fExternal set to VARIANT_FALSE and repeat step 1.

Requirements

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IRTCClient