Page 1 of 1

async websocket

Posted: Mon Jul 06, 2020 9:50 pm
by KrisRevi
Does anyone have a good reference to start with for implementing an async websocket server on the ESP32? I already looked at https://github.com/danni/uwebsockets but that is still a "blocking" socket, not using uasyncio...

I also had a look at https://github.com/jczic/MicroWebSrv but this has only a websocket server implementation (a very good one, using threads). The official micropython-lib has the famous "uasyncio.websocket.server" https://github.com/micropython/micropyt ... ket.server which is used for the web REPL, but again no official asynchronous websockets client module...
Any async specialist that has implemented this before or any beginner tips?

Re: async websocket

Posted: Mon Jul 06, 2020 11:08 pm
by mattyt
You might want to take a look at microdot, a lightweight webserver with asyncio support.

Peter's excellent async tutorial also touches on socket programming.

I'm not an expert on the subject but that's where I'd start looking. :)

Re: async websocket

Posted: Sat Jan 15, 2022 5:45 pm
by beyonlo
Hello @KrisRevi

Did you success with that? I would like a simple example of uasyncio WebSocket Server (secure - with SSL)

Thank you!