DiscordCoreAPI
A Discord bot library written in C++, with custom asynchronous coroutines.
Loading...
Searching...
No Matches
WebSocketClient.hpp File Reference
Include dependency graph for WebSocketClient.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes and Structures

class  discord_core_api::discord_core_internal::websocket_client
 A websocket client, for communication via a tcp-connection. More...
 
class  discord_core_api::discord_core_internal::websocket_close
 Websocket close codes. More...
 

Namespaces

namespace  discord_core_api
 The main namespace for the forward-facing interfaces.
 

Enumerations

enum class  discord_core_api::discord_core_internal::websocket_op_codes {
  dispatch = 0 , heartbeat = 1 , identify = 2 , Presence_Update = 3 ,
  Voice_State_Update = 4 , resume = 6 , reconnect = 7 , Request_Guild_Members = 8 ,
  Invalid_Session = 9 , hello = 10 , Heartbeat_ACK = 11
}
 For the opcodes that could be sent/received via discord's websockets. More...
 

Enumeration Type Documentation

◆ websocket_op_codes

Enumerator
dispatch 

An event was dispatched.

heartbeat 

Fired periodically by the client to keep the connection alive.

identify 

Starts a new session during the initial handshake.

Presence_Update 

Update the client's presence.

Voice_State_Update 

Used to join/leave or move between voice channels.

resume 

Resume a previous session that was disconnected.

reconnect 

You should attempt to reconnect and resume immediately.

Request_Guild_Members 

Request information about offline guild members in a large guild.

hello 

the session has been invalidated. you should reconnect and identify/resume accordingly.

Sent immediately after connecting, contains the heartbeat_interval to use.

Heartbeat_ACK 

sent in response to receiving a heartbeat to acknowledge that it has been received.

Definition at line 137 of file WebSocketClient.hpp.