IRTCClientPortManagement::StartListenAddressAndPort

The StartListenAddressAndPort method specifies an IP address and port for the RTC Client API to listen for incoming requests on.

HRESULT StartListenAddressAndPort(BSTRbstrInternalLocalAddress,
longlInternalLocalPort);

Parameters

  • bstrInternalLocalAddress
    [in] BSTR containing the internal local IP address for the RTC Client API to listen on.
  • lInternalLocalPort
    [in] The internal local port for the RTC Client API to listen on.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
S_OK The listen socket has been created successfully.
E_FAIL The client is unable to create a listen socket for the address and port specified.
RTC_E_CLIENT_NOT_INITIALIZED The client object has not been initialized.

Remarks

This method can be called multiple times to listen on more than one port.

For more information on setting the listen address and port, see the Receive an Incoming Session When the Client is Behind a NAT code example.

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_IRTCClientPortManagement is defined as d5df3f03-4bde-4417-aefe-71177bdaea66.

See Also

IRTCClientPortManagement, IRTCPortManager, IRTCSessionPortManagement, IRTCClientPortManagement::StopListenAddressAndPort, Receive an Incoming Session When the Client is Behind a NAT