Hi All,

A quick question here.

I have read the POE Cookbook example on broadcasting events (more correctly, multicasting events) to various sessions and I'd like to implement it (for keypress events) in my program.

I intend to have a hash in my 'master' session and pass this hash (by reference) to all the various child sessions which would like to 'subscribe' to receive keypress events. They can then add their $_[SESSION]->ID()'s to the hash. Another child session, somewhere else in the program, will then post keypress events to all the key's in the hash.

My question is this: Passing the hash around is quite a lot of work - I'm sending it to a spawn() method and then from there to the child session's heap. Is there an alternative method?

Is it possible for my 'master' session to find the SESSION ID's of it's children? Is there any way for the children to gain access and modify the master's heap?

Thanks,

James.

Reply via email to