class RTSP::Request
Parses raw request data from the server/client and turns it into attr_readers.
Attributes
body[R]
code[R]
message[R]
remote_host[RW]
rtsp_version[R]
stream_index[R]
url[R]
Public Class Methods
new(raw_request, remote_host)
click to toggle source
@param [String] raw_request The raw request string returned from the server/client. @param [String] remote_host
The IP address of the remote host.
# File lib/rtsp/request.rb, line 26 def initialize(raw_request, remote_host) if raw_request.nil? || raw_request.empty? raise RTSP::Error, "#{self.class} received nil or empty string--this shouldn't happen." end @raw_body = raw_request @remote_host = remote_host head, body = split_head_and_body_from @raw_body parse_head(head) end