Class: Scales::Monitor::WebSocket
- Inherits:
-
Goliath::WebSocket
- Object
- Goliath::WebSocket
- Scales::Monitor::WebSocket
- Defined in:
- lib/scales-monitor/web_socket.rb
Instance Method Summary collapse
- #on_close(env) ⇒ Object
- #on_error(env, error) ⇒ Object
- #on_message(env, msg) ⇒ Object
- #on_open(env) ⇒ Object
- #response(env) ⇒ Object
Instance Method Details
#on_close(env) ⇒ Object
20 21 22 |
# File 'lib/scales-monitor/web_socket.rb', line 20 def on_close(env) remove_from_subscribers(env) if env['REQUEST_PATH'] == "/socket" end |
#on_error(env, error) ⇒ Object
13 14 15 |
# File 'lib/scales-monitor/web_socket.rb', line 13 def on_error(env, error) env.logger.error error end |
#on_message(env, msg) ⇒ Object
17 18 |
# File 'lib/scales-monitor/web_socket.rb', line 17 def (env, msg) end |
#on_open(env) ⇒ Object
7 8 9 10 11 |
# File 'lib/scales-monitor/web_socket.rb', line 7 def on_open(env) send_initial_statuses(env) setup_subscription! add_to_subscribers(env) end |