class Azu::Spark
- Azu::Spark
- Azu::Channel
- Reference
- Object
Defined in:
azu/spark.crConstant Summary
-
COMPONENTS =
{} of String => Component
-
GC_INTERVAL =
10.seconds
Class Method Summary
Instance Method Summary
-
#on_binary(binary)
Invoked when the channel receives a binary message
-
#on_close(code : HTTP::WebSocket::CloseCode | Int | Nil = nil, message = nil)
Invoked when the channel process is about to exit.
-
#on_connect
On Connect event handler Invoked when incoming socket connection connects to the endpoint
-
#on_message(message)
Invoked when the channel receives a message
-
#on_ping(message)
Invoked when the client has requested a ping message
-
#on_pong(message)
Invoked when the client has requested a pong message
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
Instance Method Detail
def on_binary(binary)
#
Description copied from class Azu::Channel
Invoked when the channel receives a binary message
Description copied from class Azu::Channel
Invoked when the channel process is about to exit.
def on_connect
#
Description copied from class Azu::Channel
On Connect event handler Invoked when incoming socket connection connects to the endpoint
def on_message(message)
#
Description copied from class Azu::Channel
Invoked when the channel receives a message
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
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