ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
webrtc_datachannel_callbacks_t Struct Reference

DataChannel callback structure. More...

#include <include/ascii-chat/network/webrtc/webrtc.h>

Data Fields

void(* on_open )(webrtc_data_channel_t *dc, void *user_data)
 Channel opened.
 
void(* on_close )(webrtc_data_channel_t *dc, void *user_data)
 Channel closed.
 
void(* on_error )(webrtc_data_channel_t *dc, const char *error, void *user_data)
 Error occurred.
 
void(* on_message )(webrtc_data_channel_t *dc, const uint8_t *data, size_t len, void *user_data)
 Message received.
 
void * user_data
 Passed to all callbacks.
 

Detailed Description

DataChannel callback structure.

Callbacks for DataChannel events (open, close, error, message). Used with webrtc_datachannel_set_callbacks() to register per-channel callbacks.

Definition at line 325 of file include/ascii-chat/network/webrtc/webrtc.h.

Field Documentation

◆ on_close

void(* webrtc_datachannel_callbacks_t::on_close) (webrtc_data_channel_t *dc, void *user_data)

Channel closed.

Definition at line 327 of file include/ascii-chat/network/webrtc/webrtc.h.

Referenced by webrtc_datachannel_set_callbacks().

◆ on_error

void(* webrtc_datachannel_callbacks_t::on_error) (webrtc_data_channel_t *dc, const char *error, void *user_data)

Error occurred.

Definition at line 328 of file include/ascii-chat/network/webrtc/webrtc.h.

Referenced by webrtc_datachannel_set_callbacks().

◆ on_message

void(* webrtc_datachannel_callbacks_t::on_message) (webrtc_data_channel_t *dc, const uint8_t *data, size_t len, void *user_data)

Message received.

Definition at line 329 of file include/ascii-chat/network/webrtc/webrtc.h.

Referenced by webrtc_datachannel_set_callbacks().

◆ on_open

void(* webrtc_datachannel_callbacks_t::on_open) (webrtc_data_channel_t *dc, void *user_data)

◆ user_data

void* webrtc_datachannel_callbacks_t::user_data

Passed to all callbacks.

Definition at line 330 of file include/ascii-chat/network/webrtc/webrtc.h.

Referenced by webrtc_datachannel_set_callbacks().


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