Re: Sending event to interested sessions

"Nicholas Perez" <[email protected]>
Newsgroups gmane.comp.lang.perl.poe
Message-ID <[email protected]>
I'm sure you can ramrod a solution out of POE::Session::MultiDispatch
(http://search.cpan.org/~cwest/POE-Session-MultiDispatch-1.3/MultiDispatch.pm)

But no, there really isn't an easy publish/subscribe component for
listing and listening for arbitrary events. I've had one in various
states of completion for quite sometime, but have yet to get enough
tuits to finish it (but finishing it is on the todo list).

If anything, you may just need to build a quick and dirty solution.
The mechanism isn't difficult.

If you are interested in fleshing out the paltry little snippets that
I've jotted down, I can nopaste you some code.

Also if you end up rolling your own, the very simple API for
POE::Component::Server::XMLRPC
(http://search.cpan.org/~mahex/POE-Component-Server-XMLRPC-0.05/XMLRPC.pm)
could be a good start.

Oh, and I call dibs POE::Component::PubSub :-D

On Thu, Mar 27, 2008 at 4:57 PM, John <[email protected]> wrote:
> Sorry if this is a basic one...
>
>  I have a UI session that spawns a TCP client session (P::C::C::TCP).  This client session will be emitting events primarily for the UI, but I do not want to "hardcode" the name of the ui session in the TCP client session.
>
>  Upon creating the TCP clent I can pass the UI session name (I assume) and use that as the session name in $kernel->post.  But what if there are also other sesions that are interested in the events?
>
>  Is there a clean way of handling this?
>
>  Thanks,
>
>  John
>



-- 
Nicholas R. Perez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.