class

Discord::WebSocket

Inherits Reference / Object

Internal wrapper around HTTP::WebSocket to decode the Discord-specific payload format used in the gateway and VWS.

Constants

Log = Discord::Log.for("ws")
ZLIB_SUFFIX = Bytes[0, 0, 255, 255]

Constructors

new(host : String, path : String, port : Int32, tls : Bool, zlib_buffer_size : Int32 = (10 * 1024) * 1024)
Source

Instance methods

close(code : HTTP::WebSocket::CloseCode | Int | Nil = nil, message = nil)
Source
on_close
Source
on_compressed
Source
on_compressed_stream
Source
on_message
Source
send(message)
Source