Re: POE and daemonization

2002-04-30 Thread Jason Boxman
On Wednesday 01 May 2002 03:05 am, you wrote: > At 02:57 AM 5/1/2002 -0400, Peter Chen wrote: > >What is the convention for handling daemonization in a POE application? > > I am unsure how kosher this solution is, but it's "functional" as far as I > know. I jacked the daemonize() routine out of p

Driver SysRW

2002-02-24 Thread Jason Boxman
This is probably obvious (but it caught me), but if anyone's using SysRW directly, as I am, it's important to note that calling $sysrw->flush( $b ) doesn't always flush the entire buffer. If there's data left over, you have to make sure it gets flushed out entirely, or you'll have data corrupt

Re: ANN: POE::Session::Cascading 0.01

2002-02-08 Thread Jason Boxman
On Friday 08 February 2002 10:50 am, you wrote: > On (02/08/02 16:38), [EMAIL PROTECTED] wrote: > > So when I speak > > about design, it is not about code in any way, but for example a > > statement that threading model xyz should be used. > > i've always found that this is better determined by ge

Re: POE::Component::Server::IRC

2002-01-24 Thread Jason Boxman
On Thursday 24 January 2002 12:58 pm, you wrote: > Speaking of memory, has anyone done an analysis of various version of POE > and perl, to see how much memory each one of these configurations use? I > would like to use POE on an embedded device which has limited memory, and > no swap space. If

Re: using alarms to timeout sessions

2002-01-12 Thread Jason Boxman
On Friday 11 January 2002 06:09 pm, you wrote: > As far as I can tell, you have two options. > > This will remove the previous delay and set a new one. The old ID is > overwritten by a new one. > > $kernel->alarm_remove( $id ); > $id = $kernel->delay_set( event_name => 120 ); Well, that was

Re: using alarms to timeout sessions

2002-01-11 Thread Jason Boxman
On Friday 11 January 2002 01:29 am, you wrote: > On Thu, Jan 10, 2002 at 10:42:39PM -0500, Jason Boxman wrote: > > I think I have it figured out, now, but for clarification. > > > > If I have a session that does something with a SocketFactory, and I want > > to implem

using alarms to timeout sessions

2002-01-10 Thread Jason Boxman
I think I have it figured out, now, but for clarification. If I have a session that does something with a SocketFactory, and I want to implement and internal timeout, I should do a delay_set( 'event', 120 ), then for each successive success event, an alarm_adjust( id, 0 ) followed immediately b

Re: some understanding problems with POE....

2002-01-08 Thread Jason Boxman
On Tuesday 08 January 2002 09:48 am, you wrote: > Hello! Hey! > Besides POE has nifty stuff like Timers and soft signals. (BTW from > the examples in the docu i didn't understood if it was necessary to > fork time consuming tasks or not there's some speaking of > multitasking, but it se

Re: caller information in session.pm

2002-01-03 Thread Jason Boxman
On Thursday 03 January 2002 10:44 pm, you wrote: > attached is a patch to pass the caller information that _invoke_state > already possesses to the states with the new CALLER_FILE and CALLER_LINE > arguments. passes all tests under mac os 10.1.2 That'll be very helpful! Thanks! > m.

Re: Wheel::ReadWrite and moving a file

2002-01-02 Thread Jason Boxman
On Wednesday 02 January 2002 10:46 pm, you wrote: > On Monday 31 December 2001 12:08 am, you wrote: > > > I guess I can refer myself to the Graceful Wheel Shutdown Cookbook hint > since that directly addresses my problem. Not surprisingly that completely fixed the problem. More proof that readi

Re: Wheel::ReadWrite and moving a file

2002-01-02 Thread Jason Boxman
On Monday 31 December 2001 12:08 am, you wrote: I guess I can refer myself to the Graceful Wheel Shutdown Cookbook hint since that directly addresses my problem.

Wheel::ReadWrite and moving a file

2001-12-30 Thread Jason Boxman
In my current application I use a ReadWrite wheel to move a file from one location to another (it could be rather large). A small percentage of the time, the newly created file that's copied to is missing the last block of data from the original file (<= 512 bytes). I'm not sure why. My 'fix

Re: One Session vs Many

2001-12-26 Thread Jason Boxman
On Wednesday 26 December 2001 12:36 pm, you wrote: > On Wed, Dec 26, 2001 at 12:57:59AM -0500, Jason Boxman wrote: > > If design a session to, say, talk to a remote HTTP server and return > > data, does it make sense to daemonize it or to simply start a new session > > of

One Session vs Many

2001-12-25 Thread Jason Boxman
If design a session to, say, talk to a remote HTTP server and return data, does it make sense to daemonize it or to simply start a new session of (object instance) for each request (I expect to be making hundreds)? Is there some logical reason why one method's better than the other or is it si

Wheel::ReadWrite and copying a file

2001-12-13 Thread Jason Boxman
I pestered dngor on IRC about this unintelligibly for a while before hacking out a solution, but I wanted to post my issue anyway in case it is of some significance. I've posted the code below for reference. Basically, I was reading from one regular unix file and writing to another regular un

Re: POE::Wheel::Run EOF?

2001-12-13 Thread Jason Boxman
On Friday 07 December 2001 11:25 am, you wrote: > Which is odd, because STDOUT and STDERR in the child process are made > unbuffered, and I explicitly close those filehandles before exiting. I finally tracked down the problem to two non POE related things a) LWP UA likes to return some of the d

Re: httpd.perl dying after awhile?

2001-12-11 Thread Jason Boxman
On Tuesday 11 December 2001 02:16 am, you wrote: > Hello- > Strange problem I've got here with the included sample httpd.perl > script... After running for awhile (sometimes a few hours, sometimes a few > days...) it seems to die out. Here's the last thing I see before it dies: > > Received a re

Re: PoCoCl::UserAgent

2001-12-07 Thread Jason Boxman
On Friday 07 December 2001 04:15 pm, you wrote: > > I'm using PoCoCi:UA 0.03 and I encountered a problem while using regular > > LWP::UserAgent style callbacks. From PoCoUA's POD: > > > > '""callback"" "callback" is an optional subroutine reference. If it is > > specified, the subroutine will be

Re: POE::Wheel::Run EOF?

2001-12-07 Thread Jason Boxman
On Friday 07 December 2001 11:25 am, you wrote: > > I don't know if this has to do with Input Events and the queue. I've > > always experienced this behavior with CVS. I haven't tested with earlier > > code. It's possible that I'm in error, though. I haven't been able to come up with anythin

Re: POE::Wheel::Run EOF?

2001-12-07 Thread Jason Boxman
On Friday 07 December 2001 07:02 am, you wrote: > > > I use STDERR to signal The Wheel::Run's job completion as I'm using > > STDOUT as a data stream channel. When I get a specific 'done' event from > > STDERR I kill the wheel. I guess it's possible the STDERR event is > > caught before the STD

Re: POE::Wheel::Run EOF?

2001-12-06 Thread Jason Boxman
On Friday 07 December 2001 12:56 am, you wrote: > On Thu, Dec 06, 2001 at 05:20:05PM -0500, Jason Boxman wrote: > > On Thursday 06 December 2001 04:02 pm, you wrote: > > > How should I detect EOF on the stdout from POE::Wheel::Run? > > > > > > SIGCHL

Filter::HTTPD

2001-12-06 Thread Jason Boxman
# 2001-07-27 RCC: This filter will not support the newer get_one() # interface. It gets single things by default, and it does not # support filter switching. If someone absolutely needs to switch to # and from HTTPD filters, they should say so on POE's mailing list. I've decided to switch to us

Re: POE::Wheel::Run EOF?

2001-12-06 Thread Jason Boxman
On Thursday 06 December 2001 04:02 pm, you wrote: > How should I detect EOF on the stdout from POE::Wheel::Run? > > SIGCHLD seems to come well before the last StdoutEvent, buffering > I expect. I also see two ErrorEvents (ARG0='read', ARG1=0). One > soon after the SIGCHLD and another after the l

Re: PoCoCi::UserAgent

2001-12-06 Thread Jason Boxman
On Thursday 06 December 2001 02:11 pm, you wrote: > On 02-Dec-2001 Jason Boxman wrote: > > I'm using PoCoCi:UA 0.03 and I encountered a problem while using regular > > LWP::UserAgent style callbacks. From PoCoUA's POD: > > > > '""callback&quo

Re: Killing sessions

2001-12-04 Thread Jason Boxman
On Tuesday 04 December 2001 03:21 pm, you wrote: > On Tue, Dec 04, 2001 at 12:39:22PM -0700, Chris Fedde wrote: > You would probably want to do something more graceful like send a > goodbye message before deleting the peace wheel, but that's the gist > of things. I agree. Just outright deleting

Re: Project statement for comment: LMA LMTP/LDAP/MailDir

2001-12-04 Thread Jason Boxman
On Tuesday 04 December 2001 12:45 pm, you wrote: > Since the topic has been broached before. Here is my pet project. > I'm building an LMTP based local mail agent with the following > features. What's an LMTP? :) > Thoughts? Ideas? Threats?

Re: Wheel::SocketFactory

2001-12-02 Thread Jason Boxman
Forgive my cluelessness. On Sunday 02 December 2001 07:32 pm, you wrote: > Is there some kind of event for a connection that goes away gracefully > without saying "goodbye" in some fashion (TCP)? It turns out that task lies with my Wheel::ReadWrite and I'm not checking for write errors there be

_default from followtail.perl locks perl

2001-12-02 Thread Jason Boxman
When the _default events gets triggered it seems blow up. default caught _child with (create POE::Session=ARRAY(0x872f2dc) 0) at ../test.pl line 843. 1: POE::Session /home/jasonb/src/poe/poe/blib/lib/POE/Session.pm 598 HTTPServer::_default 1 0 (undef) (undef) 0

Wheel::SocketFactory

2001-12-02 Thread Jason Boxman
Is there some kind of event for a connection that goes away gracefully without saying "goodbye" in some fashion (TCP)? When I slam the door on my SocketFactory by aborting a connection made to it via wget, it doesn't throw a FailureEvent, so I'm not sure how to clean things up gracefully on my

Re: can't enqueue event(_signal)

2001-12-02 Thread Jason Boxman
On Sunday 02 December 2001 08:42 am, you wrote: > On Sat, Dec 01, 2001 at 11:47:40PM -0500, Jason Boxman wrote: > > I'm working with Wheel::SocketFactory and Wheel::Run. > > [...] > > > Is there some way I can get the child process to exit gracefully or > > sign

PoCoCi::UserAgent

2001-12-01 Thread Jason Boxman
This is directed mainly towards Kirill Shuykin since his webmail form wasn't responding when I tried to mail him through his page, but if anyone else has any ideas, that's great too. I'm using PoCoCi:UA 0.03 and I encountered a problem while using regular LWP::UserAgent style callbacks.

can't enqueue event(_signal)

2001-12-01 Thread Jason Boxman
I'm working with Wheel::SocketFactory and Wheel::Run. When I have a client talking to my socket and it suddenly (perhaps due to user intervention) goes away, I still have a Wheel::Run process lingering around. It's trying to send data to the session that created it on STDIN and STDERR, but th

Wheel::FollowTail

2001-11-28 Thread Jason Boxman
The following error message was somewhat baffling at first: croak "Handle or Filename required, but not both" unless $params{Handle} xor defined $params{Filename}; That was the result of using "InputHandler" by accident instead of just "Handler". I'd think the error should be revised to

URI::URL happenings

2001-11-27 Thread Jason Boxman
I notice Filter::HTTPD uses the exported function, url(), from URI::URL. Well, the version of HTTP::Request isn't happy with it anymore, probably because I upgraded my libwww-perl. This fix seems to work, at least with full URLs. I haven't tested anything weird with it yet (line 124 latest P

SysRW flushing

2001-11-26 Thread Jason Boxman
On Monday 26 November 2001 12:22 am, you wrote: > On Sun, Nov 25, 2001 at 11:11:09PM -0500, Jason Boxman wrote: > > > I don't understand this part. Artur Bergman, the author of > Filter::HTTPD, wrote a simple streaming mp3 server that sends headers > first and then

Re: latest LWP and Filter::HTTPD

2001-11-26 Thread Jason Boxman
On Monday 26 November 2001 02:00 am, you wrote: > I just installed the most recent LWP::* modules and Filter::HTTPD seems > broken now against CVS from two days ago. > > Event: trapped error in `?? Kernel.pm:718': Can't use a URI::URL object as > a URI at /home/jasonb/src/poe/poe/blib/lib/POE/Filt

latest LWP and Filter::HTTPD

2001-11-25 Thread Jason Boxman
I just installed the most recent LWP::* modules and Filter::HTTPD seems broken now against CVS from two days ago. Event: trapped error in `?? Kernel.pm:718': Can't use a URI::URL object as a URI at /home/jasonb/src/poe/poe/blib/lib/POE/Filter/HTTPD.pm line 122 At that point the script has to b

Re: POE::Filter::HTTPD

2001-11-25 Thread Jason Boxman
On Monday 26 November 2001 12:22 am, you wrote: > On Sun, Nov 25, 2001 at 11:11:09PM -0500, Jason Boxman wrote: > > > [...] > > > First, *HTTPD wants to tack on a duplicate protocol and version to each > > outgoing stream: > > [...] > > Sorry about that.

POE::Filter::HTTPD

2001-11-25 Thread Jason Boxman
Hey all! I've got the latest CVS and I've been using POE::Filter::HTTPD to convert data between HTTP::* objects and streams. I noticed two things. First, *HTTPD wants to tack on a duplicate protocol and version to each outgoing stream: my $stream = $httpd_object->put( $response_object ); pri