Concord - C Discord API library
A Discord API wrapper library written in C
|
#include <curl-websocket.h>
Data Fields | |
void(* | on_connect )(void *data, CURL *easy, const char *websocket_protocols) |
void(* | on_text )(void *data, CURL *easy, const char *text, size_t len) |
void(* | on_binary )(void *data, CURL *easy, const void *mem, size_t len) |
void(* | on_ping )(void *data, CURL *easy, const char *reason, size_t len) |
void(* | on_pong )(void *data, CURL *easy, const char *reason, size_t len) |
void(* | on_close )(void *data, CURL *easy, enum cws_close_reason reason, const char *reason_text, size_t reason_text_len) |
const void * | data |
void(* cws_callbacks::on_connect) (void *data, CURL *easy, const char *websocket_protocols) |
called upon connection, websocket_protocols contains what server reported as 'Sec-WebSocket-Protocol:'.
void(* cws_callbacks::on_text) (void *data, CURL *easy, const char *text, size_t len) |
reports UTF-8 text messages.
void(* cws_callbacks::on_binary) (void *data, CURL *easy, const void *mem, size_t len) |
reports binary data.
void(* cws_callbacks::on_ping) (void *data, CURL *easy, const char *reason, size_t len) |
reports PING.
void(* cws_callbacks::on_pong) (void *data, CURL *easy, const char *reason, size_t len) |
reports PONG.
void(* cws_callbacks::on_close) (void *data, CURL *easy, enum cws_close_reason reason, const char *reason_text, size_t reason_text_len) |
reports server closed the connection with the given reason.
Clients should not transmit any more data after the server is closed, just call cws_free().
const void* cws_callbacks::data |