class

ActionCable::Server

Inherits Reference < Object

Constructors

new(pubsub : SubscriptionAdapter::Base = SubscriptionAdapter::Async.new, mount_path : String = Internal::DEFAULT_MOUNT_PATH)
Source

Instance methods

broadcast(stream_name : String, message : String) : Nil
Source
broadcast(stream_name : String, message) : Nil
Source
connection_identifiers

Identifier names registered via Connection.identified_by (the gem's Server#connection_identifiers).

Source
connections
Source
mount_path
pubsub
register_connection(connection : Connection) : Nil

--- connection registry ----------------------------------------- Connections register on open and unregister on close; used for introspection (the remote-disconnect delivery itself rides the per-connection internal channel through pubsub, so it works across processes).

Source
remote_connections

Remote-connection searches: find connections by identifier and disconnect them across all servers sharing the pubsub adapter.

Source
shutdown
Source
unregister_connection(connection : Connection) : Nil
Source
ws_handler

Builds an HTTP handler mounting the cable endpoint at #mount_path; non-cable and non-upgrade requests pass through. Mount like:

server = ActionCable::Server.new HTTP::Server.new([server.ws_handler]) # combined with app routes

Source

Nested types