tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
584 stars 180 forks source link

netdev: fix concurrency issues with multiple sockets #642

Closed scottfeldman closed 5 months ago

scottfeldman commented 5 months ago

The wifinina driver was not handling multiple concurrent sockets correctly. This PR fixes the wifinina driver and adds an example/net/snake test for testing multiple concurrent sockets. The wioterminal driver (rtl8270dn) needed no changes to pass the snake test.

deadprogram commented 5 months ago

I tested these changes and they appear to be working as expected.

deadprogram commented 5 months ago

Rebased to squash the last 3 commits together, then merged to dev. Thanks for the fixes @scottfeldman