DiscordWebsocket
The DiscordWebsocket
class manages the websocket connection to Discord. It handles sending and receiving messages, managing the connection state, and processing incoming and outgoing events.
Properties
websocketWebsocketBuffer
DiscordWebsocket.websocketWebsocketBuffer :: Network.WebsocketBuffer
socketActiveChanged
socketActive
DiscordWebsocket.socketActive :: boolean
gatewayEventIn
DiscordWebsocket.gatewayEventIn :: Network.EventIn
gatewayEventOut
DiscordWebsocket.gatewayEventOut :: Network.EventOut
onMessageRecv
onSocketDead
onOperationRecv
reporter
DiscordWebsocket.reporter :: Vendor.Console
socketUrl
DiscordWebsocket.socketUrl :: STRING?
socketInstance
DiscordWebsocket.socketInstance :: WebSocket
socketRequestSuccess
DiscordWebsocket.socketRequestSuccess :: boolean?
socketThread
DiscordWebsocket.socketThread :: thread?
Methods
sendAsync
DiscordWebsocket : sendAsync () -> Vendor.Future
self: DiscordWebsocket
dataPacket: table
Sends a data packet asynchronously through the websocket.
connectAsync
DiscordWebsocket : connectAsync () -> Vendor.Future
self: DiscordWebsocket
websocketUrl: string
Connects to a websocket URL asynchronously.
disconnectAsync
DiscordWebsocket : disconnectAsync () -> Vendor.Future
self: DiscordWebsocket
closingCode: string
Disconnects from the websocket asynchronously.
Functions
new
DiscordWebsocket . new () -> ()
Creates a new instance of DiscordWebsocket
.