abstract class Cable::Connection
- Cable::Connection
- Reference
- Object
Defined in:
cable/connection.crConstant Summary
-
CHANNELS =
{} of String => Hash(String, Cable::Channel)
Constructors
Class Method Summary
Instance Method Summary
- #close
- #closed? : Bool
- #connect
- #connection_identifier : String
- #connection_identifier=(connection_identifier : String)
- #connection_rejected? : Bool
-
#connection_requesting_duplicate_channel_subscription?(payload)
ensure we only allow subscribing to the same channel once from a connection
- #identifier
- #internal_identifier : String
- #internal_identifier=(internal_identifier : String)
- #message(payload : Cable::Payload)
- #receive(message : String)
- #reject(payload : Cable::Payload)
- #reject_unauthorized_connection
- #send_message(message : String)
- #socket : HTTP::WebSocket
- #started_at : Time
- #subscribe(payload : Cable::Payload)
- #token : String | Nil
- #unsubscribe(payload : Cable::Payload)
Macro Summary
Constructor Detail
Class Method Detail
Instance Method Detail
def connection_requesting_duplicate_channel_subscription?(payload)
#
ensure we only allow subscribing to the same channel once from a connection
def receive(message : String)
#
Convert the #message
to a proper Payload
.
The Cable::Handler
will handle catching SerializableError
,
and close the socket and connection