struct
Amber::Testing::TestClientSocket
- Amber::Testing::TestClientSocket
- Amber::WebSockets::ClientSocket
- Struct
- Value
- Object
Overview
A minimal client socket used internally by TestWebSocket. Users testing their own socket types should use WebSocketHelpers with their actual socket structs.
Defined in:
amber/testing/websocket_helpers.crInstance Method Summary
-
#on_connect : Bool
Authentication and authorization can happen here
Instance methods inherited from struct Amber::WebSockets::ClientSocket
channels : Hash(String, Amber::WebSockets::Channel)
channels,
channels=(channels : Hash(String, Amber::WebSockets::Channel))
channels=,
connection_id : String
connection_id,
get_channel(path : String) : Channel | Nil
get_channel,
handle_error(ex : Exception, context : String = "unknown")
handle_error,
on_connect : Bool
on_connect,
on_disconnect
on_disconnect,
on_error(ex : Exception)
on_error,
on_reconnect
on_reconnect,
socket : HTTP::WebSocket
socket
Constructor methods inherited from struct Amber::WebSockets::ClientSocket
new(socket : HTTP::WebSocket, context : HTTP::Server::Context, connection_id : String)new(socket : HTTP::WebSocket, context : HTTP::Server::Context) new
Class methods inherited from struct Amber::WebSockets::ClientSocket
broadcast(event : String, topic : String, subject : String, payload : Hash)
broadcast,
channel(channel_path, channel_class)
channel,
channels
channels,
decoder : Decoders::Decoder
decoder,
get_topic_channel(topic_path)
get_topic_channel
Instance Method Detail
def on_connect : Bool
#
Description copied from struct Amber::WebSockets::ClientSocket
Authentication and authorization can happen here