Class: OpenTok::Connections
- Inherits:
-
Object
- Object
- OpenTok::Connections
- Defined in:
- lib/opentok/connections.rb
Overview
A class for working with OpenTok connections.
Instance Method Summary collapse
-
#forceDisconnect(session_id, connection_id) ⇒ Object
Force a client to disconnect from an OpenTok session.
Instance Method Details
#forceDisconnect(session_id, connection_id) ⇒ Object
Force a client to disconnect from an OpenTok session.
A client must be actively connected to the OpenTok session for you to disconnect it.
20 21 22 23 24 25 |
# File 'lib/opentok/connections.rb', line 20 def forceDisconnect(session_id, connection_id ) raise ArgumentError, "session_id not provided" if session_id.to_s.empty? raise ArgumentError, "connection_id not provided" if connection_id.to_s.empty? response = @client.forceDisconnect(session_id, connection_id) (200..300).include? response.code end |