instance method
close
Ruby on Rails 6.1.7.10
Since v5.2.8.1Signature
close(reason: nil, reconnect: true)
Close the WebSocket connection.
Parameters
-
reasonkey = nil -
reconnectkey = true
Source
# File actioncable/lib/action_cable/connection/base.rb, line 100
def close(reason: nil, reconnect: true)
transmit(
type: ActionCable::INTERNAL[:message_types][:disconnect],
reason: reason,
reconnect: reconnect
)
websocket.close
end
Defined in actioncable/lib/action_cable/connection/base.rb line 100
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Connection::Base