Open danidee10 opened 6 years ago
Hi @danidee10 the websocket api is the same since 2014, so i think it requires a bit of work :)
If you want to take the task i will be happy to review it. Avoid asyncio in your tests as i am working on a brand new implementation (that probably requires months to be useful...), but gevent and multithreading are absolutely the most common scenario.
Okay @unbit Let me get my hands dirty and see what i can do.
I'll probably need to join the #IRC Channel
Straight from the docs for
uwsgi.websocket_recv
:The function/logic for holding the connection open should be moved to another method. I propose something like:
uwsgi.websocket_ping_pong
Why ?
In cases where you have a write only websocket (You're not reading any messages from it, just pushing to the client) it doesn't really make sense to call
uwsgi.websocket_recv
just to keep the connection open. The logic should be abstracted into another method.Also it's not right. Ideally a function/method should only do one thing.
I don't know much about the
uWSGI
core but if this issue is considered i would be glad to work with the core devs in implementing this.