IRTCClient2::put_AllowedPorts

The put_AllowedPorts method sets the way that the Client listens for incoming sessions. This method sets the ports that can be retrieved by IRTCClient2::get_AllowedPorts.

HRESULT put_AllowedPorts(longlTransport,
RTC_LISTEN_MODEpenMode);

Parameters

  • lTransport
    [in] A long that contains the transport.
  • penMode
    [in] An RTC_LISTEN_MODE enumeration that contains the listen mode.

Return Values

RTC methods may return an RTC_E_ constant.

Remarks

The RTC_LISTEN_MODE can be set to open both static and dynamic ports to listen for incoming sessions. Unless required, it is best not to open static port 5060. As a well-known port, it is more susceptible to attack.

If this method is called after the listen mode has been set by calling the IRTCClient::put_ListenForIncomingSessions method, or after calling IRTCClient::get_ListenForIncomingSessions, the RTC Client API will return an RTC_E_NOT_ALLOWED error.

Note  Incoming sessions will not be secure unless the application sets the listen mode to disallow both static and dynamic ports (RTCLM_NONE), and the TLS transport is specified in the profile.

Applications should not call this method if there are existing sessions. Calling this method does not affect the state of active sessions.

Requirements

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_IRTCClient2 is defined as 0C91D71D-1064-42da-BFA5-572BEB8EEA84.

See Also

IRTCClient, IRTCClient::get_ListenForIncomingSessions, IRTCClient::put_ListenForIncomingSessions, IRTCClient2, IRTCClient2::get_AllowedPorts, IRTCClient2::put_AnswerMode, RTC_LISTEN_MODE