Http io?

Well, I'd advise reading

http://redhanded.hobix.com/inspect/theStoryOfStreamingHttpThroughMouseho
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.html

but I can't get it to work.

any help is appreciated.....

Horacio

#####################################################################################
This email has been scanned by MailMarshal, an email content filter.
#####################################################################################

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/theStoryOfStreamingHttpThroughMouseho
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.html
>
> but I can't get it to work.
>
> any help is appreciated.....
>
> Horacio

###########################################################################
########## This email has been scanned by MailMarshal, an email content
filter.
###########################################################################
##########

Sorry, also an usage example would be appreciated..

regards,
Horacio

Wednesday 16 November 2005 15:52、Horacio Sanson さんは書きました:

···

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/theStoryOfStreamingHttpThroughMouseho
> 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.html
> >
> > but I can't get it to work.
> >
> > any help is appreciated.....
> >
> > Horacio
>
> #########################################################################
>## ########## This email has been scanned by MailMarshal, an email content
> filter.
> #########################################################################
>## ##########