From: Denis Haskin Date: 2008-12-24T23:10:42+09:00 Subject: Re: Net::HTTPResponse#read_body usable for timing? --------------040902060903050002090402 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Thanks, Brian -- I was figuring I would probably have to dive into the source to look at this, thanks for the roadmap. I'll probably look at it over the holidays for fun ;-) dwh Brian Candler wrote: > Denis Haskin wrote: > >> Does anyone know if read_body is synchronous wrt to the network reads? >> > > The source will be installed somewhere like > /usr/lib/ruby/1.8/net/http.rb - it's all in Ruby and fairly easy to > understand. Look for read_body and read_body_0. > > However, you can see it relies on some Ruby internals, such as > Socket#read calling << on the dest buffer object; see ReadAdapter in > net/protocol.rb (*) > > [...] --------------040902060903050002090402--