Class: Chromecast::Channel::Connection

Inherits:
Base
  • Object
show all
Defined in:
lib/chromecast/channel/connection.rb

Constant Summary collapse

NAMESPACE =
'urn:x-cast:com.google.cast.tp.connection'

Instance Attribute Summary

Attributes inherited from Base

#connection, #namespace, #type

Instance Method Summary collapse

Methods inherited from Base

#send

Constructor Details

#initialize(connection) ⇒ Connection

Returns a new instance of Connection.



6
7
8
# File 'lib/chromecast/channel/connection.rb', line 6

def initialize connection
  super(connection, NAMESPACE, :json)
end

Instance Method Details

#closeObject



14
15
16
# File 'lib/chromecast/channel/connection.rb', line 14

def close
  send(type: 'CLOSE')
end

#connectObject



10
11
12
# File 'lib/chromecast/channel/connection.rb', line 10

def connect
  send(type: 'CONNECT')
end