IRTCSessionPortManagement::SetPortManager

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method allows an application to specify a callback interface that allows the RTC Client API to obtain NAT mappings when required.

Syntax

HRESULT SetPortManager(
  IRTCPortManager* pPortManager
);

Parameters

  • pPortManager
    [in] Pointer to the IRTCPortManager interface exposed by the application to allow the RTC Client API to obtain a port mapping.

    A null pointer is allowed.

Return Value

This method can return an RTC_E_ constant, as well as any of the standard COM and ADSI return values.

The following table shows additional return values and additional information about a specific return value.

Value Description

E_FAIL

The interface has not been successfully set.

RTC_E_INVALID_SESSION_TYPE

The interface cannot be set on this type of session.

S_OK

The interface has been successfully set.

Remarks

This method is required only when a NAT is in place that does not support UPnP functionality.

If this method is not called, the RTC Client API supports only those NATs that support UPnP functionality by default.

This method can be called multiple times when the session is idle. A session is idle when the session has been created but the participants have not been added to the session.

Each successful call to SetPortManager overwrites the previous IRTCPortManager callback interface. The method returns an error if it is called when the session is not idle. The application should be prepared to return the port mappings immediately after the application calls SetPortManager.

Aa921672.security(en-us,MSDN.10).gifSecurity Note:
This method can send data over the network in unencrypted form. Therefore, someone eavesdropping on the network might be able to read the data. Before using this method in an unencrypted session, consider the security risk of sending the data in clear text. The application can encrypt an RTC session by specifying TLS in the profile used for the session.

Requirements

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

See Also

Reference

IRTCSessionPortManagement
IRTCPortManager