Class: Net::RTSP::SetParameter

Inherits:
RTSPGenericRequest show all
Defined in:
lib/raop/rtsp.rb

Instance Method Summary collapse

Methods inherited from RTSPGenericRequest

#exec

Constructor Details

#initialize(session_id, opts = {}) ⇒ SetParameter

Returns a new instance of SetParameter.



162
163
164
165
166
167
168
169
170
# File 'lib/raop/rtsp.rb', line 162

def initialize(session_id, opts = {})
  super('SET_PARAMETER')
  self['Content-Type'] = 'text/parameters'
  buf = ''
  opts.each do |k,v|
    buf << "#{k}: #{sprintf('%0.6f', v)}\r\n"
  end
  @body = buf if buf.length > 0
end