| Previous | Next |
| RTC_E_INVALID_LISTEN_SOCKET | RTC_E_SECURITY_LEVEL_ALREADY_SET |
RTC_E_PORT_MANAGER_ALREADY_SET
Operational meaning: RTC_E_PORT_MANAGER_ALREADY_SET
This code belongs to registering listening sockets and supplying internal/external media mappings before session establishment: the session already has a port-manager callback and RTC forbids replacing it at this stage.
For correlation, retain 0x80EE007C in the RTC interface facility 0xEE together with this result; generic HRESULT text can otherwise hide the protocol family and the exact RTC branch.
The quickest way to localize this result is to record session generation, current manager identity, set timing, and whether participant addition began; the important boundary is that the result protects mapping consistency; it is not confirmation that the current manager returned valid mappings.
Signals worth preserving
- Code-specific proof: record session generation, current manager identity, set timing, and whether participant addition began.
- Correlation key:
SDPaddress derived from mapping. - Protocol or object snapshot: local and external address/port.
- Last completed transition: port type and allowed range.
- Expected output: mapping owner and lifetime.
Protocol and object state
| RTC area | RTC listening and NAT port-mapping |
|---|---|
| Condition to prove | the session already has a port-manager callback and RTC forbids replacing it at this stage |
| Objects to correlate | IRTCClientPortManagement, IRTCSessionPortManagement, IRTCPortManager, address/port range and mapping lifetime |
| Safe corrective direction | reuse the installed manager or create a new session before initiation if a different mapping owner is required |
For outgoing sessions the port manager must be set before adding the participant; for incoming sessions it must be set before acceptance. The address advertised in SDP and the local socket receiving media are different values when NAT mapping is involved.
Verification workflow
- Record it and
0x80EE007Cat the first RTC method or event that returns it. - Prove the condition by ensuring the trace can record session generation, current manager identity, set timing, and whether participant addition began.
- Apply one controlled change: reuse the installed manager or create a new session before initiation if a different mapping owner is required; then verify the result return value and resulting RTC state.
Do not confuse it with
RTC_E_PORT_MAPPING_UNAVAILABLE | the port manager cannot provide a usable internal/external mapping for the requested media flow |
|---|---|
RTC_E_LISTENING_SOCKET_NOT_EXIST | code attempted to stop or use a listening address/port registration that is not active |
RTC_E_PORT_MAPPING_FAILED | the port manager returned a concrete failure while creating or retrieving a mapping |
Recovery and control flow
The appropriate response to it is not a blanket reconnect. Instead, reuse the installed manager or create a new session before initiation if a different mapping owner is required, while preserving ownership of cleanup and any bounded retry.
Example: Two NAT modules both call SetPortManager on the same outgoing session.
Actions that do not address this condition
- Do not advertise an external mapping before confirming that it belongs to the current local socket.
- Do not set or replace the port manager after session initiation has consumed the mapping.
Technical references
Looking for a different code? Search another status or error code.
