in reply to Re: Net::Async::WebSocket::Server in a separate main loop
in thread Net::Async::WebSocket::Server in a separate main loop
That is exactly the problem, I cannot use "loop->run" as this blocks the complete application. I need to find a way to call the websocket server logic from within my main loop only using "loop_once", as this is not a blocking call.
But it seems I have figured out what the problem is... The check for data on socket seems to "destroy" the async loop logic. I will need to find another way to get the main loop to hook into my logic so I can process websocket messages.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Net::Async::WebSocket::Server in a separate main loop
by NERDVANA (Priest) on Jan 12, 2023 at 22:52 UTC |