ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
webrtc_datachannel_callbacks_t Struct Reference

Event hooks and caller context for one WebRTC DataChannel. 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

Event hooks and caller context for one WebRTC DataChannel.

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

Definition at line 334 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 336 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 337 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 338 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)

Channel opened.

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

Referenced by webrtc_datachannel_set_callbacks().

◆ user_data

void* webrtc_datachannel_callbacks_t::user_data

Passed to all callbacks.

Definition at line 339 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: