The IRTCClientPortManagement interface provides methods that allow the client application to supply additional IP addresses and ports for the RTC Client API to listen on. This interface is primarily used by applications implementing the NAT Traversal (IRTCClient::get_NetworkAddresses) and NAT Mapping (IRTCSessionPortManagement and IRTCPortManager) APIs.

The IRTCClientPortManagement interface provides the means to manage ports for incoming traffic when the application is situated behind a non-UPnP-enabled NAT. The application communicates the port for incoming traffic out-of-band to the remote client. Once the session request arrives and creates the incoming session, the application sets the port manager on the session object. For more information on client port management, see Receive an Incoming PC-PC Session.

The IRTCSessionPortManagement interface provides the IRTCPortManager interface to the RTC API. The RTC API uses this interface to obtain the mappings for internal and external IP addresses and ports for the session. For outgoing sessions, the application must set the IRTCPortManager interface on the session object before the session request is sent out. For incoming sessions, the IRTCPortManager interface is set before accepting the incoming session. For more information on outgoing session port management, see The Client Application is behind a NAT.

The IRTCClientPortManagement interface can be obtained by performing a QueryInterface on the IRTCClient2 interface.

Methods in RPC Opnum Order

The IRTCClientPortManagement interface defines the following methods.

Method Description
StartListenAddressAndPort Allows an application to supply the IP address and port for the RTC Client API to listen on.
StopListenAddressAndPort Informs the RTC Client API to stop listening for incoming requests on a specific address and port.
GetPortRange Returns the minimum and maximum values for the range of statically configured ports for the specified port type.


Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClientPortManagement is defined as d5df3f03-4bde-4417-aefe-71177bdaea66.

See Also

Port Management