Concord - C Discord API library
A Discord API wrapper library written in C
|
The handle used for interfacing with Discord's Gateway API. More...
#include <discord-internal.h>
Data Fields | |
struct logconf | conf |
struct websockets * | ws |
CURLM * | mhandle |
struct { | |
int64_t hbeat_interval | |
bool hbeat_acknowledged | |
u64unix_ms now | |
u64unix_ms hbeat_last | |
u64unix_ms identify_last | |
u64unix_ms event | |
unsigned hbeat_timer | |
int ping_ms | |
pthread_rwlock_t rwlock | |
} * | timer |
struct discord_identify | id |
struct discord_gateway_session * | session |
struct discord_gateway_payload | payload |
discord_ev_event | cbs [2][DISCORD_EV_MAX] |
discord_ev_scheduler | scheduler |
The handle used for interfacing with Discord's Gateway API.
struct logconf discord_gateway::conf |
DISCORD_GATEWAY
logging module
struct websockets* discord_gateway::ws |
the websockets handle that connects to Discord
CURLM* discord_gateway::mhandle |
curl_multi handle for non-blocking transfer over websockets
int64_t discord_gateway::hbeat_interval |
fixed milliseconds interval between heartbeats
HELLO
bool discord_gateway::hbeat_acknowledged |
boolean that indicates if the last heartbeat was answered
u64unix_ms discord_gateway::now |
Gateway's concept of "now"
u64unix_ms discord_gateway::hbeat_last |
last heartbeat pulse timestamp
READY
and RESUME
, then updated every hbeat_interval
u64unix_ms discord_gateway::identify_last |
timestamp of last succesful identify request
u64unix_ms discord_gateway::event |
timestamp of last succesful event
unsigned discord_gateway::hbeat_timer |
timer id for heartbeat timer
int discord_gateway::ping_ms |
latency obtained from HEARTBEAT
and HEARTBEAT_ACK
response interval
pthread_rwlock_t discord_gateway::rwlock |
ping rwlock
struct { ... } * discord_gateway::timer |
timers kept for synchronization
struct discord_identify discord_gateway::id |
the identify structure for client authentication
struct discord_gateway_session* discord_gateway::session |
on-going session structure
struct discord_gateway_payload discord_gateway::payload |
response-payload structure
discord_ev_event discord_gateway::cbs[2][DISCORD_EV_MAX] |
the user's callbacks for Discord events
discord_ev_scheduler discord_gateway::scheduler |
the event scheduler callback