From: Daniel Sheppard Date: 2005-11-16T15:58:51+09:00 Subject: Re: HTTP IO?? the ... implies the missing code. Grab the whole thing from: http://rubyforge.org/cgi-bin/viewcvs.cgi/mouseHole/lib/net/httpio.rb?cvsroot=mousehole The read and close method should work the same as the read and close methods on IO. Any other IO methods that you'd like supported, you'll need to add yourself. > -----Original Message----- > From: Horacio Sanson [mailto:hsanson@moegi.waseda.jp] > Sent: Wednesday, 16 November 2005 5:53 PM > To: ruby-talk ML > Subject: Re: HTTP IO?? > > > Does a verbatim copy of this code work?? I really don't > understand what it does but that code gives me syntax errors > > 316: syntax error def read len = nil; ... end > > Horacio > > > Wednesday 16 November 2005 15:30、Daniel Sheppard さんは書きました: > > Well, I'd advise reading > > > > > http://redhanded.hobix.com/inspect/theStoryOfStreamingHttpThroughMouse > > ho leWithSubsequentAdventuresInContinuationsAndDuckTyping.html > > > > And using the code there for the HTTPIO object. It's what works for > > mousehole, which I've been using quite happily as my > internet proxy, > > so I guess that the HTTPIO object works. > > > > Now the question is, what are you actually doing. Then we > can probably > > figure out what's wrong. Now, _why's code doesn't make an actual IO > > object - just one that looks sufficiently like an IO object for the > > Webrick to be convinced to use the read method - he's got a > specific > > use-case, and crammed the object to work in that situation. It > > probably wont work in yours without further tweaking. > > > > > -----Original Message----- > > > From: Horacio Sanson [mailto:hsanson@moegi.waseda.jp] > > > Sent: Wednesday, 16 November 2005 4:56 PM > > > To: ruby-talk ML > > > Subject: HTTP IO?? > > > > > > > > > I am developing a streaming client in ruby, so far so good... > > > now I am trying to get Net::HTTP to behave like an IO > with no luck. > > > I need Net::HTTP to read the headers as it usually does > but stop at > > > before reading the body of the page so I can read the stream in > > > chunks and feed them to the player. > > > > > > I read this article > > > > > > http://redhanded.hobix.com/inspect/theStoryOfStreamingHttpThro > > > > ughMouseholeWithSubsequentAdventuresInContinuationsAndDuckTyping.htm > > > l > > > > > > but I can't get it to work. > > > > > > any help is appreciated..... > > > > > > Horacio > > > > > >############################################################# > ########## > >#### ########## This email has been scanned by MailMarshal, an email > >content filter. > > > >############################################################# > ########## > >#### > >########## > > ############################################################## > ####################### > This email has been scanned by MailMarshal, an email content filter. > ############################################################## > ####################### > > ##################################################################################### This email has been scanned by MailMarshal, an email content filter. #####################################################################################