class Azu::Spark

Defined in:

azu/spark.cr

Constant Summary

COMPONENTS = {} of String => Component
GC_INTERVAL = 10.seconds

Class Method Summary

Instance Method Summary

Instance methods inherited from class Azu::Channel

call(context : HTTP::Server::Context) call, on_binary(binary) on_binary, on_close(code : HTTP::WebSocket::CloseCode | Int | Nil = nil, message = nil) on_close, on_connect on_connect, on_message(message) on_message, on_ping(message) on_ping, on_pong(message) on_pong, socket : HTTP::WebSocket socket, socket? : HTTP::WebSocket | Nil socket?

Constructor methods inherited from class Azu::Channel

new(socket : HTTP::WebSocket) new

Class methods inherited from class Azu::Channel

ws(path : Router::Path) ws

Class Method Detail

def self.javascript_tag #

[View source]

Instance Method Detail

def on_binary(binary) #
Description copied from class Azu::Channel

Invoked when the channel receives a binary message


[View source]
def on_close(code : HTTP::WebSocket::CloseCode | Int | Nil = nil, message = nil) #
Description copied from class Azu::Channel

Invoked when the channel process is about to exit.


[View source]
def on_connect #
Description copied from class Azu::Channel

On Connect event handler Invoked when incoming socket connection connects to the endpoint


[View source]
def on_message(message) #
Description copied from class Azu::Channel

Invoked when the channel receives a message


[View source]
def on_ping(message) #
Description copied from class Azu::Channel

Invoked when the client has requested a ping message

Pings have an opcode of 0x9


[View source]
def on_pong(message) #
Description copied from class Azu::Channel

Invoked when the client has requested a pong message

Pongs have an opcode of 0xA


[View source]