I'm running a websocket listener in a separate thread. I'd like to connect to the websocket then do:
while True:
msg = sock.wait_for_message()
f(msg)
i.e. no async/asyncio
Is this stupid? Is there a way to do this?
I'm running a websocket listener in a separate thread. I'd like to connect to the websocket then do:
while True:
msg = sock.wait_for_message()
f(msg)
i.e. no async/asyncio
Is this stupid? Is there a way to do this?
In absence of a better answer, I have found https://github.com/websocket-client/websocket-client which prove painless to use.