|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
WebRTC P2P signaling for discovery mode failover. More...
Go to the source code of this file.
Functions | |
| webrtc_signaling_callbacks_t | discovery_webrtc_get_direct_signaling_callbacks (acip_transport_t *tcp_transport, const uint8_t session_id[16], const uint8_t participant_id[16]) |
| Create signaling callbacks for direct peer-to-peer connection during failover. | |
| void | discovery_webrtc_set_tcp_transport (acip_transport_t *transport) |
| Set the TCP transport for direct peer-to-peer signaling. | |
| void | discovery_webrtc_set_session_context (const uint8_t session_id[16], const uint8_t participant_id[16]) |
| Set session and participant IDs for direct signaling. | |
| void | discovery_webrtc_cleanup_transport (void) |
| Cleanup and release the direct peer-to-peer transport. | |
WebRTC P2P signaling for discovery mode failover.
Provides WebRTC peer connection management for discovery mode failover scenarios. When a host dies and participants need to connect to the pre-elected future host, they establish P2P connections using WebRTC DataChannels.
Key Difference from Client Mode:
During migration:
Definition in file discovery/webrtc.h.
| void discovery_webrtc_cleanup_transport | ( | void | ) |
Cleanup and release the direct peer-to-peer transport.
Clears the TCP transport used for direct signaling. Called on migration completion or when the P2P connection is torn down.
Definition at line 291 of file src/discovery/webrtc.c.
| webrtc_signaling_callbacks_t discovery_webrtc_get_direct_signaling_callbacks | ( | acip_transport_t * | tcp_transport, |
| const uint8_t | session_id[16], | ||
| const uint8_t | participant_id[16] | ||
| ) |
Create signaling callbacks for direct peer-to-peer connection during failover.
Returns callbacks that send SDP/ICE directly over TCP to the peer (not through ACDS). Used when participants reconnect to a new host after migration.
| tcp_transport | TCP transport connected to the new host |
| session_id | Session UUID (16 bytes, copied) |
| participant_id | Local participant UUID (16 bytes, copied) |
Definition at line 244 of file src/discovery/webrtc.c.
References participant_id, and session_id.
| void discovery_webrtc_set_session_context | ( | const uint8_t | session_id[16], |
| const uint8_t | participant_id[16] | ||
| ) |
Set session and participant IDs for direct signaling.
Configures the session context used when sending SDP/ICE messages directly. Must be called before peer manager generates any local descriptions.
| session_id | Session UUID (16 bytes, copied) |
| participant_id | Local participant UUID (16 bytes, copied) |
Definition at line 276 of file src/discovery/webrtc.c.
References participant_id, and session_id.
| void discovery_webrtc_set_tcp_transport | ( | acip_transport_t * | transport | ) |
Set the TCP transport for direct peer-to-peer signaling.
Configures the transport that will be used to send SDP/ICE messages directly to the peer (bypassing ACDS). Must be called before peer manager generates any local descriptions.
| transport | TCP transport to new host (NULL to disable) |
Definition at line 269 of file src/discovery/webrtc.c.