|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Client-side WebRTC signaling callback implementations. More...
Go to the source code of this file.
Functions | |
| webrtc_signaling_callbacks_t | webrtc_get_signaling_callbacks (void) |
| Get signaling callbacks for WebRTC peer manager. | |
| void | webrtc_set_acds_transport (acip_transport_t *transport) |
| Set the ACDS transport for signaling callbacks. | |
| void | webrtc_set_session_context (const uint8_t session_id[16], const uint8_t participant_id[16]) |
| Set session and participant IDs for signaling. | |
| void | webrtc_set_transport (acip_transport_t *transport) |
| Set the WebRTC data channel transport. | |
| acip_transport_t * | webrtc_get_transport (void) |
| Get the current WebRTC data channel transport. | |
| void | webrtc_cleanup_transport (void) |
| Cleanup and release the WebRTC data channel transport. | |
Client-side WebRTC signaling callback implementations.
Implements the send_sdp and send_ice callbacks that the peer manager uses to transmit local SDP/ICE to remote peers via ACDS.
Both callbacks construct ACIP packets following the wire format:
Callbacks use mutex protection for accessing shared state (ACDS transport, session context). Safe to call from peer manager threads.
Definition in file src/client/webrtc.c.
| void webrtc_cleanup_transport | ( | void | ) |
Cleanup and release the WebRTC data channel transport.
Closes and releases the WebRTC transport. Called when disconnecting or falling back to a different transport type.
Definition at line 350 of file src/client/webrtc.c.
References log_debug, mutex_lock, and mutex_unlock.
| webrtc_signaling_callbacks_t webrtc_get_signaling_callbacks | ( | void | ) |
Get signaling callbacks for WebRTC peer manager.
Returns a structure containing callback functions that send SDP/ICE via the ACDS TCP connection. The callbacks are stateless - they use the global ACDS transport to send signaling messages.
Definition at line 250 of file src/client/webrtc.c.
References webrtc_signaling_callbacks_t::send_sdp.
| acip_transport_t * webrtc_get_transport | ( | void | ) |
Get the current WebRTC data channel transport.
Retrieves the active WebRTC transport for peer-to-peer communication.
Definition at line 329 of file src/client/webrtc.c.
References mutex_lock, and mutex_unlock.
| void webrtc_set_acds_transport | ( | acip_transport_t * | transport | ) |
Set the ACDS transport for signaling callbacks.
Configures the transport that will be used to send SDP/ICE messages. Must be called before peer manager generates any local descriptions.
| transport | ACDS TCP transport (NULL to clear) |
Definition at line 259 of file src/client/webrtc.c.
References log_debug, mutex_lock, and mutex_unlock.
Set session and participant IDs for signaling.
Configures the session context used when sending SDP/ICE messages. Must be called after successful ACDS session join.
| session_id | Session UUID (16 bytes, copied) |
| participant_id | Local participant UUID (16 bytes, copied) |
Definition at line 274 of file src/client/webrtc.c.
References log_error, log_info, mutex_lock, mutex_unlock, participant_id, and session_id.
| void webrtc_set_transport | ( | acip_transport_t * | transport | ) |
Set the WebRTC data channel transport.
Stores the active WebRTC transport that will be used for peer-to-peer communication. This is different from the ACDS signaling transport - it's the actual data channel.
| transport | WebRTC transport (NULL to clear) |
Definition at line 304 of file src/client/webrtc.c.
References log_debug, mutex_lock, and mutex_unlock.
| bool is_set |
Definition at line 63 of file src/client/webrtc.c.
Referenced by options_config_validate().
| uint8_t participant_id[16] |
Definition at line 62 of file src/client/webrtc.c.
Referenced by session_leave(), webrtc_peer_manager_connect(), and webrtc_set_session_context().
| uint8_t session_id[16] |
Definition at line 61 of file src/client/webrtc.c.
Referenced by database_delete_session(), session_leave(), signaling_broadcast(), turn_generate_credentials(), webrtc_peer_manager_connect(), and webrtc_set_session_context().