class Discord::WebSocket

Overview

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

Defined in:

discordcr/websocket.cr

Constant Summary

ZLIB_SUFFIX = Bytes[0, 0, 255, 255]

Constructors

Instance Method Summary

Constructor Detail

def self.new(host : String, path : String, port : Int32, tls : Bool, logger : Logger, zlib_buffer_size : Int32 = (10 * 1024) * 1024) #

[View source]

Instance Method Detail

def close(*args, **options) #

[View source]
def close(*args, **options, &block) #

[View source]
def on_close(&handler : String -> ) #

[View source]
def on_compressed(&handler : Packet -> ) #

[View source]
def on_compressed_stream(&handler : Packet -> ) #

[View source]
def on_message(&handler : Packet -> ) #

[View source]
def run(*args, **options) #

[View source]
def run(*args, **options, &block) #

[View source]
def send(message) #

[View source]