Skip Menu |

This queue is for tickets about the POE-Component-Client-HTTP CPAN distribution.

Report information
The Basics
Id: 5292
Status: resolved
Priority: 0/
Queue: POE-Component-Client-HTTP

People
Owner: martijn [...] cpan.org
Requestors: rcaputo [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Wed, 11 Feb 2004 12:58:23 -0500
From: Rocco Caputo <rcaputo [...] pobox.com>
To: poe [...] perl.org
CC: bug-POE-Component-Client-HTTP [...] rt.cpan.org
Subject: Re: Quick question re. POE::Component::Client::HTTP
On Wed, Feb 11, 2004 at 11:07:21AM +0000, James Brown wrote: Show quoted text
> Hi All, > > I'm using POE::Component::Client::HTTP to 'stream-in' a web page in > chunks of size 4096. Could anyone tell me whether there is a 'shutdown' > event (or equivalent) for this component please? > > If I send a '_stop' message to a session which created a component, > would this destroy the component as well? > > Please excuse the 'newbieness' of my questions.
"Newbie" questions are welcome, at least until the list gets busy enough to split into developer and user tracks. There currently is no way to shut down a streaming request. I could see where it's needed for halting a streamed media download. You can probably work around this by sending a signal to the HTTP component, like: $_[KERNEL]->signal( ua => 'KILL' ); That should just kill off the component entirely, though. Any parallel requests would also be aborted, and you'd need to create a new POE::Component::Client::HTTP if you wanted to run more requests. This message has been Cc'd to bug-POE-Component-Client-HTTP@rt.cpan.org so I'll remember that the feature's needed. -- Rocco Caputo - rcaputo@pobox.com - http://poe.perl.org/
it would also be good if Streaming responses could also respect MaxSize. that would help in the case where you want to avoid storing a large file in memory and stream it directly to disk. On Wed Feb 11 12:58:31 2004, rcaputo@pobox.com wrote: Show quoted text
> On Wed, Feb 11, 2004 at 11:07:21AM +0000, James Brown wrote:
> > Hi All, > > > > I'm using POE::Component::Client::HTTP to 'stream-in' a web page in > > chunks of size 4096. Could anyone tell me whether there is a 'shutdown' > > event (or equivalent) for this component please? > > > > If I send a '_stop' message to a session which created a component, > > would this destroy the component as well? > > > > Please excuse the 'newbieness' of my questions.
> > "Newbie" questions are welcome, at least until the list gets busy enough > to split into developer and user tracks. > > There currently is no way to shut down a streaming request. I could see > where it's needed for halting a streamed media download. > > You can probably work around this by sending a signal to the HTTP > component, like: > > $_[KERNEL]->signal( ua => 'KILL' ); > > That should just kill off the component entirely, though. Any parallel > requests would also be aborted, and you'd need to create a new > POE::Component::Client::HTTP if you wanted to run more requests. > > This message has been Cc'd to bug-POE-Component-Client-HTTP@rt.cpan.org > so I'll remember that the feature's needed. >
From: dArGo [...] sPAm.lA
On Wed Feb 11 12:58:31 2004, rcaputo@pobox.com wrote: Show quoted text
> On Wed, Feb 11, 2004 at 11:07:21AM +0000, James Brown wrote: > There currently is no way to shut down a streaming request. I could see > where it's needed for halting a streamed media download. > > You can probably work around this by sending a signal to the HTTP > component, like: > > $_[KERNEL]->signal( ua => 'KILL' ); > > That should just kill off the component entirely, though. Any parallel > requests would also be aborted, and you'd need to create a new > POE::Component::Client::HTTP if you wanted to run more requests.
can't you just use the recipe listed in the cookbook (insider HTTP, not user code): http://poe.perl.org/?Poe_cookbook/graceful_wheel_shutdown
On Mon May 01 03:46:35 2006, guest wrote: Show quoted text
> > can't you just use the recipe listed in the cookbook (insider HTTP, not > user code): http://poe.perl.org/?Poe_cookbook/graceful_wheel_shutdown
That doesn't work here because the interface for POE::Wheel::* is different from the interfaces for POE::Component::*.
Added a "cancel" command that takes a single HTTP::Request object. Committed the fix as revision 260. Uploaded version 0.76 to PAUSE. Thanks for your request!