Module: Slack::RealTime::Api::Ping

Included in:
Client
Defined in:
lib/slack/real_time/api/ping.rb

Instance Method Summary collapse

Instance Method Details

#ping(options = {}) ⇒ Object

Clients should try to quickly detect disconnections, even in idle periods, so that users can easily tell the difference between being disconnected and everyone being quiet. Not all web browsers support the WebSocket ping spec, so the RTM protocol also supports ping/pong messages.



10
11
12
# File 'lib/slack/real_time/api/ping.rb', line 10

def ping(options = {})
  send_json({ type: 'ping', id: next_id }.merge(options))
end