Method: ActionCable::Connection::Base#close
- Defined in:
- actioncable/lib/action_cable/connection/base.rb
#close(reason: nil, reconnect: true) ⇒ Object
Close the WebSocket connection.
120 121 122 123 124 125 126 127 |
# File 'actioncable/lib/action_cable/connection/base.rb', line 120 def close(reason: nil, reconnect: true) transmit( type: ActionCable::INTERNAL[:message_types][:disconnect], reason: reason, reconnect: reconnect ) websocket.close end |