Concord - C Discord API library
A Discord API wrapper library written in C
|
WebSockets callbacks. More...
#include <websockets.h>
Data Fields | |
void(* | on_connect )(void *data, struct websockets *ws, struct ws_info *info, const char *protocols) |
Called upon connection. More... | |
void(* | on_text )(void *data, struct websockets *ws, struct ws_info *info, const char *text, size_t len) |
Reports UTF-8 text messages. More... | |
void(* | on_binary )(void *data, struct websockets *ws, struct ws_info *info, const void *mem, size_t len) |
reports binary data. More... | |
void(* | on_ping )(void *data, struct websockets *ws, struct ws_info *info, const char *reason, size_t len) |
reports PING. More... | |
void(* | on_pong )(void *data, struct websockets *ws, struct ws_info *info, const char *reason, size_t len) |
reports PONG. More... | |
void(* | on_close )(void *data, struct websockets *ws, struct ws_info *info, enum ws_close_reason wscode, const char *reason, size_t len) |
reports server closed the connection with the given reason. More... | |
void * | data |
user arbitrary data to be passed around callbacks More... | |
WebSockets callbacks.
void(* ws_callbacks::on_connect) (void *data, struct websockets *ws, struct ws_info *info, const char *protocols) |
Called upon connection.
void(* ws_callbacks::on_text) (void *data, struct websockets *ws, struct ws_info *info, const char *text, size_t len) |
Reports UTF-8 text messages.
void(* ws_callbacks::on_binary) (void *data, struct websockets *ws, struct ws_info *info, const void *mem, size_t len) |
reports binary data.
void(* ws_callbacks::on_ping) (void *data, struct websockets *ws, struct ws_info *info, const char *reason, size_t len) |
reports PING.
void(* ws_callbacks::on_pong) (void *data, struct websockets *ws, struct ws_info *info, const char *reason, size_t len) |
reports PONG.
void(* ws_callbacks::on_close) (void *data, struct websockets *ws, struct ws_info *info, enum ws_close_reason wscode, const char *reason, size_t len) |
reports server closed the connection with the given reason.
Clients should not transmit any more data after the server is closed
void* ws_callbacks::data |
user arbitrary data to be passed around callbacks