A websocket client

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
dauntless
Posts: 1
Joined: Sat Feb 27, 2021 5:52 pm

A websocket client

Post by dauntless » Sat Feb 27, 2021 6:05 pm

Hi guys,
I had searched in the offical docs but I didn't find a websocket client module, can anyone tell me is there a module in micropython?

So I built a websocket module use usocket, but socket.recv will block, I used socket.setblocking(0), then it will raise error "EAGAIN".

I am a green hand in python.

User avatar
rubydesign
Posts: 3
Joined: Wed Mar 31, 2021 1:19 pm

Re: A websocket client

Post by rubydesign » Fri Apr 23, 2021 10:21 am

Moi dauntless
j
i am wondering the very same (also green). I have found a websocket module that is built in.
Ie for a socket s you can

Code: Select all

import websocket
ws = websocket.websocket(s)
But zero docs. Found the code at https://github.com/micropython/micropyt ... ebsocket.c
but that does not help me.

This lack of docs seems a strange omission, since the code is 5 years old. And the server is included, so why not the client.

Keep me up to date if you (or anyone) find out more

Torsten

Post Reply