uasync VS socket

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
Pablo Oyarzo
Posts: 16
Joined: Tue Mar 14, 2017 12:55 am

uasync VS socket

Post by Pablo Oyarzo » Sun Sep 10, 2017 3:04 am

1) Is uasync supposed to be a higher and better way to do networking than socket?
2) Where I can find documentation on the portion of uasync that is implemented on micropython ?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: uasync VS socket

Post by pythoncoder » Sun Sep 10, 2017 8:19 am

They serve different purposes - (u)asyncio is a means of doing cooperative multi-tasking which can be used for applications other than networking. Some networking applications use uasyncio, some use _thread, and others run without any multi-tasking. The usocket module implements BSD sockets which are the basis for networking applications.

There is no official documentation on the MicroPython asyncio subset, but an unofficial guide is here https://github.com/peterhinch/micropython-async - follow the link to the tutorial.
Peter Hinch
Index to my micropython libraries.

Post Reply