|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
🎬 WebRTC SDP/ICE signaling relay implementation More...
Go to the source code of this file.
Data Structures | |
| struct | find_client_context_t |
| Context for finding client by participant_id. More... | |
| struct | broadcast_context_t |
| Context for broadcasting to session participants. More... | |
Functions | |
| asciichat_error_t | signaling_relay_sdp (session_registry_t *registry, tcp_server_t *tcp_server, const acip_webrtc_sdp_t *sdp, size_t total_packet_len) |
| Relay SDP offer/answer to recipient. | |
| asciichat_error_t | signaling_relay_ice (session_registry_t *registry, tcp_server_t *tcp_server, const acip_webrtc_ice_t *ice, size_t total_packet_len) |
| Relay ICE candidate to recipient. | |
| asciichat_error_t | signaling_broadcast (session_registry_t *registry, tcp_server_t *tcp_server, const uint8_t session_id[16], packet_type_t packet_type, const void *packet, size_t packet_len) |
| Broadcast packet to all session participants. | |
🎬 WebRTC SDP/ICE signaling relay implementation
Pure relay server for WebRTC signaling - no media processing. Relays SDP offers/answers and ICE candidates between participants using participant_id → socket mapping from tcp_server client registry.
RCU Integration:
Definition in file signaling.c.
| asciichat_error_t signaling_broadcast | ( | session_registry_t * | registry, |
| tcp_server_t * | tcp_server, | ||
| const uint8_t | session_id[16], | ||
| packet_type_t | packet_type, | ||
| const void * | packet, | ||
| size_t | packet_len | ||
| ) |
Broadcast packet to all session participants.
Sends packet to all participants in a session. Used internally by SDP/ICE relay when recipient_id is all zeros.
| registry | Session registry |
| tcp_server | TCP server with client registry |
| session_id | Session UUID |
| packet_type | Packet type to send |
| packet | Packet data to broadcast |
| packet_len | Packet length |
Definition at line 227 of file signaling.c.
References ASCIICHAT_OK, ERROR_INVALID_PARAM, ERROR_NETWORK_PROTOCOL, log_debug, log_warn, broadcast_context_t::sent_count, session_entry::session_id, session_id, session_registry_t::sessions, SET_ERRNO, broadcast_context_t::target_session_id, and tcp_server_foreach_client().
Referenced by signaling_relay_ice(), and signaling_relay_sdp().
| asciichat_error_t signaling_relay_ice | ( | session_registry_t * | registry, |
| tcp_server_t * | tcp_server, | ||
| const acip_webrtc_ice_t * | ice, | ||
| size_t | total_packet_len | ||
| ) |
Relay ICE candidate to recipient.
Relays ICE packet to specific participant or broadcasts to all participants in the session if recipient_id is all zeros.
| registry | Session registry |
| tcp_server | TCP server with client registry |
| ice | ICE packet to relay (with variable-length candidate data following struct) |
| total_packet_len | Total packet length including variable data |
Definition at line 170 of file signaling.c.
References ASCIICHAT_OK, ERROR_INVALID_PARAM, ERROR_NETWORK, ERROR_NETWORK_PROTOCOL, find_client_context_t::found, find_client_context_t::found_socket, INVALID_SOCKET_VALUE, log_debug, PACKET_TYPE_ACIP_WEBRTC_ICE, send_packet(), session_entry::session_id, session_registry_t::sessions, SET_ERRNO, signaling_broadcast(), and tcp_server_foreach_client().
| asciichat_error_t signaling_relay_sdp | ( | session_registry_t * | registry, |
| tcp_server_t * | tcp_server, | ||
| const acip_webrtc_sdp_t * | sdp, | ||
| size_t | total_packet_len | ||
| ) |
Relay SDP offer/answer to recipient.
Relays SDP packet to specific participant or broadcasts to all participants in the session if recipient_id is all zeros.
| registry | Session registry |
| tcp_server | TCP server with client registry |
| sdp | SDP packet to relay (with variable-length SDP data following struct) |
| total_packet_len | Total packet length including variable data |
Definition at line 113 of file signaling.c.
References ASCIICHAT_OK, ERROR_INVALID_PARAM, ERROR_NETWORK, ERROR_NETWORK_PROTOCOL, find_client_context_t::found, find_client_context_t::found_socket, INVALID_SOCKET_VALUE, log_debug, PACKET_TYPE_ACIP_WEBRTC_SDP, send_packet(), session_entry::session_id, session_registry_t::sessions, SET_ERRNO, signaling_broadcast(), and tcp_server_foreach_client().