ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
Loading...
Searching...
No Matches
webrtc_data_channel Struct Reference

WebRTC data channel for sending/receiving messages. More...

Data Fields

int rtc_id
 libdatachannel data channel ID
 
webrtc_peer_connection_t * pc
 Parent peer connection.
 
bool is_open
 Channel open state.
 
void(* user_on_open )(webrtc_data_channel_t *dc, void *user_data)
 Open callback.
 
void(* user_on_close )(webrtc_data_channel_t *dc, void *user_data)
 Close callback.
 
void(* user_on_error )(webrtc_data_channel_t *dc, const char *error, void *user_data)
 Error callback.
 
void(* user_on_message )(webrtc_data_channel_t *dc, const uint8_t *data, size_t len, void *user_data)
 Message callback.
 
void * user_data
 User data for per-channel callbacks.
 

Detailed Description

WebRTC data channel for sending/receiving messages.

Bidirectional communication channel over a WebRTC peer connection. Supports custom per-channel callbacks for open/close/error/message events.

Definition at line 49 of file lib/network/webrtc/webrtc.c.

Field Documentation

◆ is_open

bool webrtc_data_channel::is_open

Channel open state.

Definition at line 52 of file lib/network/webrtc/webrtc.c.

◆ pc

webrtc_peer_connection_t* webrtc_data_channel::pc

Parent peer connection.

Definition at line 51 of file lib/network/webrtc/webrtc.c.

◆ rtc_id

int webrtc_data_channel::rtc_id

libdatachannel data channel ID

Definition at line 50 of file lib/network/webrtc/webrtc.c.

◆ user_data

void* webrtc_data_channel::user_data

User data for per-channel callbacks.

Definition at line 60 of file lib/network/webrtc/webrtc.c.

◆ user_on_close

void(* webrtc_data_channel::user_on_close) (webrtc_data_channel_t *dc, void *user_data)

Close callback.

Definition at line 56 of file lib/network/webrtc/webrtc.c.

◆ user_on_error

void(* webrtc_data_channel::user_on_error) (webrtc_data_channel_t *dc, const char *error, void *user_data)

Error callback.

Definition at line 57 of file lib/network/webrtc/webrtc.c.

◆ user_on_message

void(* webrtc_data_channel::user_on_message) (webrtc_data_channel_t *dc, const uint8_t *data, size_t len, void *user_data)

Message callback.

Definition at line 58 of file lib/network/webrtc/webrtc.c.

◆ user_on_open

void(* webrtc_data_channel::user_on_open) (webrtc_data_channel_t *dc, void *user_data)

Open callback.

Definition at line 55 of file lib/network/webrtc/webrtc.c.


The documentation for this struct was generated from the following file: