You are going to need to place all of your processing within PoCo::Client::TCP. If you read the docs and take a look at the examples in the Cookbook online, you can see that you can provide events for various states like after the connection is finished. You gotta remember with POE, you are doing your processing inside the event loop, not on the outside.

Jay Strauss wrote:

Hi,

Basically, I'd like to start a POE::Component::Client::TCP, then continue
sequential processing.  Meanwhile the POE::Component::Client::TCP will be
handling messages coming down the wire, and my program would be doing other
stuff.  I'm worried that maybe this is a threading circumstance, and I want
to avoid threading.

Sorta like:

use strict;
use POE qw(Component::Client::TCP);

POE::Component::Client::TCP->new(
...
);

$poe_kernel->run();

# Then, somehow drop past the ->run and execute something like:

$kernel->{server}->put(@data);

Thanks
Jay




Reply via email to