IRTCSessionPortManagement::SetPortManager (Windows CE 5.0)

Send Feedback

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

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 Values

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.

Security 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

OS Versions: Windows CE .NET 4.2 and later.
Header: Rtccore.h, Rtccore.idl.
Link Library: Uuid.lib.

See Also

IRTCSessionPortManagement | IRTCPortManager

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.