I am reading the stream from a Ogg stream server (VLC) in the
local machine.
This requires fast reading.Are there any other options in ruby to read a data stream via HTTP??
Now that I know I know your use-case, definitely use openuri instead.
The only situations where you can’t use openuri is when you need finer
control over the headers (and the ability to read the response headers).
In your case, this doesn’t seem to be a problem.
Also, you can use the basic Net::HTTP to read chunked responses (which
I’m fairly sure would be used in a stream) - instead of calling
read_body on the response to get the entire body, pass a block to that
method - as each chunk is received, you’ll get it yielded to the method.
Not sure if this is useful in ogg decoding though - do you need to be
reading fixed lengthed strings from the stream or is it ok for the
length of each chunk to be arbitary?
#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################