You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Writing to UDP requires separate APIs to use to append data and finalize.
TCP sends and confirms per-write and finalize is a no-op. UDP appends to a buffer and finalize sends all at once.
The simple socket_open method doesn't actually create a socket per https://github.com/arduino/nina-fw.
Since socket_connect is a convenience method anyway, and connect doesn't really make sense for UDP, add the start_server call for UDP to that method to have a socket to write as well as read on.
e.x. usage
esp.socket_connect(socket_num, dest, port, esp.UDP_MODE)
esp.socket_write(socket_num, buffer, esp.UDP_MODE)
avail = esp.socket_available(socket_num)
recv = esp.socket_read(socket_num, avail)
esp.socket_close(socket_num)
0 commit comments