Your workaround seems sensible if you choose to stay with Net::WebSocket::Server, as that module does not provide easy integration with other event loops.
Other frameworks like Mojolicious or Plack::App::WebSocket provide ways to also have other events like timer events getting fired. But I haven't done any websocket stuff, so I don't know how well those modules actually support your use case.
In reply to Re: Sending periodic messages on a Websocket server
by Corion
in thread Sending periodic messages on a Websocket server
by vijneedshelp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |