bad param patch for PoCo::Client::TCP

2006-02-02 Thread Dan McCormick
Any objections to adding a check for bad params in Client::TCP? It would've saved me some recent typo-related head-scratching. I just stole the code from Server::TCP. Dan --- /usr/lib/perl5/site_perl/5.8.5/POE/Component/Client/TCP.pm 2004-07-15 10:01:38.0 -0400 +++ TCP.pm.my

POE::Component::OSCAR 0.03 released

2006-02-01 Thread Dan McCormick
Hi all, Just wanted to let everyone know that POE::Component::OSCAR 0.03 is out. I've included two sample scripts in the distribution, one is an OSCAR/telnet gateway, and the other uses Wheel::FollowTail to IM log lines to you. Changes since 0.02: - Added throttle argument to prevent rate

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-23 Thread Dan McCormick
I briefly considered whether the wheel should guarantee flushing on shutdown, but I decided against it. Sometimes people may want to shut down a client regardless of the input waiting for it. Maybe the shutdown methods need flush/immediate options? That would definitely be convenient.

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-22 Thread Dan McCormick
get_driver_out_octets and get_driver_out_messages in POE::Wheel::Run (or POE::Wheel?) since they aren't mentioned anywhere? Dan On 12/21/04 9:57 PM, Rocco Caputo [EMAIL PROTECTED] wrote: On Tue, Dec 21, 2004 at 08:39:53PM -0800, Dan McCormick wrote: So consider this: I have a stream of data, which I'm

Re: Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-21 Thread Dan McCormick
, even though if I then call stdin_shutdown the data never arrives at my process. Any suggestions? Am I missing something? Thanks, Dan On 12/21/04 3:18 PM, Rocco Caputo [EMAIL PROTECTED] wrote: On Mon, Dec 20, 2004 at 10:44:23PM -0800, Dan McCormick wrote: Shouldn't the code below print 1

Problems sending to stdin of POE::Wheel::Run-spawned process

2004-12-20 Thread Dan McCormick
Hi, Shouldn't the code below print 1, 2, 3, 4 on separate lines to the file /tmp/test.txt? If I comment out lines 537-538 of POE::Wheel::Run.pm, namely: $poe_kernel-select_pause_write($self-[HANDLE_STDIN]) unless ($self-[OCTETS_STDIN]); ... things work as (I) expected. Some cursory

Re: AIM/OSCAR Component?

2004-04-17 Thread Dan McCormick
in August, Dan McCormick said he had written (and documented!) POE::Component::Net::OSCAR. There's call for such a beast if it still exists. Has anyone seen it lately? -- Rocco Caputo

Re: fork and talking to parent

2003-12-05 Thread Dan McCormick
Hi Jay, Have you played with POE::Wheel::Run? It seems suited to what you're doing: Wheel::Run spawns child processes and establishes non-blocking, event based communication with them. Give that a try and let us know how you fare. Dan On Thu, 2003-12-04 at 19:09, Jay Strauss wrote: Hi, I

Re: Beginner's Question - Tk and POE

2003-12-03 Thread Dan McCormick
Hi Tom, POE uses the concept of sessions, which are similar to threads. POE::Component::Client::TCP (hereafter Poco::TCP) spawns a new session, which is distinct from the main session of the rest of your app. Each session has its own distinct heap. So, first off, wrt your application,

$session-callback() return value

2003-08-26 Thread Dan McCormick
Actually, whaddya say we return the actual return value of the callback instead of POSTBACK_RETVAL? As you know, POSTBACK_RETVAL is hard coded to zero for postback, but looking over a Gtk mailing list, someone notes: Event signals return a boolean value. Gtk uses this value to decide whether to

Re: $session-callback

2003-08-25 Thread Dan McCormick
On Sat, 2003-08-23 at 19:22, Rocco Caputo wrote: On Sat, Aug 23, 2003 at 04:04:26PM -0400, Dan McCormick wrote: (Which raises the question: has there been talk of a synchronous $session-callback()?) Not until today. :) If you look at the postback() code in POE::Session, it should

Re: PoCo::Net::OSCAR -- solved!

2003-08-23 Thread Dan McCormick
On Fri, 2003-08-22 at 17:38, Rocco Caputo wrote: On Fri, Aug 22, 2003 at 03:09:59PM -0400, Dan McCormick wrote: [...] fileno() returning undef is a great way to check for a closed file. Your problem is you're ignoring it. Try this instead: unless (defined fileno $handle) { $kernel

Re: PoCo::Net::OSCAR

2003-08-22 Thread Dan McCormick
the code if you're interested, but completely understand if you've got bigger fish to fry. Thanks, Dan On Thu, 2003-08-21 at 21:10, Rocco Caputo wrote: On Thu, Aug 21, 2003 at 04:12:34PM -0400, Dan McCormick wrote: Howdy, If no one's released a PoCo::Net::OSCAR (i.e. the public face of AOL's

PoCo::Net::OSCAR

2003-08-21 Thread Dan McCormick
Howdy, If no one's released a PoCo::Net::OSCAR (i.e. the public face of AOL's IM), I've got one to offer. However, I was hoping for a bit of feedback first, because I'm not sure I've gone about it in the best way. The Net::OSCAR module is very nice in that it can use other event loops. The

Re: problems using package methods...

2003-06-23 Thread Dan McCormick
Hi Josh, If Ping.pm is a separate file, you need to use POE to import the KERNEL, HEAP, etc. constants. Try that and see if things improve. Dan Josh wrote: I am having a strange problem w/package methods not seeming to work properly, at least as far as I understand them. This is my first

conditionally using ASSERT_STATES

2002-03-18 Thread Dan McCormick
Howdy, This is more of a Perl question, but since it's POE-related... How do you conditionally turn on something like ASSERT_STATES? I'd like to do something like... if ($TEST_MODE) { sub POE::Kernel::ASSERT_STATES () { 1 } } use POE; but of course the subroutine gets compiled

ReadWrite wheels, InputStates, and error events

2001-12-14 Thread Dan McCormick
Hi, I discovered something -- not sure if it's a bug or a feature -- but it's worth noting: When using ReadWrite wheels to just send data (is there a better method?), defining an empty InputState (or, presumably, any InputState, but since we're just sending data InputState = '' will suffice)

ikc question

2001-08-27 Thread Dan McCormick
Hi, I have a few IKC questions... I'm monitoring client connections using IKC = 'monitor', '*' = { register = 'client_connect' } When a client connects, the 'client_connect' state gets called *three* times, each time with a different kernel alias, which will

problems with $kernel-delay and Gtk - follow-up

2001-08-16 Thread Dan McCormick
2001 16:22:31 -0400 From: Dan McCormick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Hi, Has anyone had any problems using $kernel-delay and Gtk? In my application, setting a delay of one second takes 15 seconds to process. But if I take out the use Gtk statement, it works fine. I can't seem

problems with $kernel-delay and Gtk

2001-08-15 Thread Dan McCormick
Hi, Has anyone had any problems using $kernel-delay and Gtk? In my application, setting a delay of one second takes 15 seconds to process. But if I take out the use Gtk statement, it works fine. I can't seem to reproduce the code in a small snippet, so until I whittle it down further I