SignalK / SensESP

Universal Signal K sensor framework for the ESP32 platform
https://signalk.org/SensESP/
Apache License 2.0
153 stars 81 forks source link

Async WSClient #556

Closed mairas closed 2 years ago

mairas commented 2 years ago

The SK websocket token testing and connection establishing has been heavily blocking, stopping the program execution until the connection has been established. This behavior prevents for example seamless simultaneous N2K and SK output.

This PR moves the SK websocket operations to a separate FreeRTOS task. Concurrency between the main and WSClient tasks is ensured with mutexes and task queues.

Fixes #450.