On Jan 12, 2007, at 13:58, <[EMAIL PROTECTED]> wrote:
Hello,
I am trying to capture counts of the lines seen on a
POE::Component::Client::TCP session at three different intervals.
...
svr_input is updating the heap that belongs to the PoCo, I would
like to
update the heap from the session that controls the timers.
So there are two ways to do it, update a the timer heap from the PoCo,
or access the PoCo heap information from the timer session. I know
getting the information is the better way, but I can not figure out
how
to access the ifromation.
A third way: Put the accumulators in a scope shared by both sessions.
my $cnt_10 = 0;
my $cnt_60 = 0;
my $cnt_3600 = 0;
my $iter_10 = 0;
my $iter_60 = 0;
my $iter_3600 = 0;
...
sub srv_input {
$cnt_10++;
$cnt_60++;
$cnt_3600++;
print SYSINFO $input . "\n";
}
sub count_sec {
my ($session,$heap) = @_[SESSION, HEAP];
$_[KERNEL]->delay('Timer_10', 10);
print POETLOG "10 Second Iteration: $iter_10 Count: $cnt_10\n";
$cnt_10 = 0;
$iter_10++;
}
... etc.
--
Rocco Caputo - [EMAIL PROTECTED]