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 have this process that forks, the child opens up a socket and listens (in
> a while loop).
>
> When the child reads something, it calls the appropriate sub to handle the
> message (tickPrice for example). Once I'm in tickPrice(), I'd like to send
> some data back to the parent.
>
> 1) is the a proper use of POE.
>
> I figured I'd use POE::Component::Client::TCP in the child and
> POE::Component::Server::TCP in the parent. After looking at the docs for
> POE::Component::Client::TCP, and the cookbook. I don't see how I could send
> a message back to the parent.
>
> I know there is:
> $heap->{server}->put(@things_to_send);
>
> But I don't know how I'd get the value of $heap into my subroutine? Since
> there was no POE event.
>
> Thanks
> Jay
>