I’m using POE to build a system that bridges several protocols (HTTP, IRC, XMPP), and I’d like to use POE to drive a single event loop that handles these protocols. Can I do this safely, and if so, how?
I’m using POE to build a system that bridges several protocols (HTTP, IRC, XMPP),
Share
Yes, you can. Read this article, it should help you much.
Also here’s code example of IRC and HTTP running together:
Just remember, you need setup everything before you run mainloop:
POE::Kernel->run()And you can broadcast events between your tasks.