Hello fellow Monks. I have what seems like a very simple question. I am fairly new to POE, but I quite like what I have seen so far. I have a POE::Component::Server::TCP session set up and working. It spews out new client sessions just like it's supposed to, and everything seems to be working great.
The only thing is, I'd like to have a nice way to broadcast a message to all current clients. I currently do this with a plain old subroutine, which when called iterates through the currently connected users and puts the message. This works fine, but I think it would be nice to have a broadcast state on the P::C::S::TCP server session that does the same thing.
Now, I know about the InlineStates, PackageStates, and ObjectStates elements in the constructor, but this only adds these states to the client sessions. I want to add a state to the server session. I also know about $kernel->state(...), but again I have the same problem. One can only modify the states of the active session, and I cannot find a place to add any code to P::C::S::TCP's server session (i.e. I cannot run $kernel->state(...) when the server session is active). Perhaps there is something I am overlooking in the documentation, but I just can't seem to find anything.
Any help would be greatly appreciated.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |