We are now starting to get into what I would consider to be more advanced concepts. Here is one I put forward to us as a community ... are sockets thread safe with respect to reading and writing?
Imagine I have a FreeRTOS task that invokes a socket recv() API call and is blocked waiting for incoming TCP data. Now imagine a second task that is running in parallel to the first. Is this second task allowed to make a TCP send() API call on the SAME socket while the other task is blocked on a recv()?
Concurrent socket usage from multiple tasks
Concurrent socket usage from multiple tasks
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Concurrent socket usage from multiple tasks
Yes, this should work. The receiving task will remain blocked until the other end of the TCP connection has sent data.
Who is online
Users browsing this forum: No registered users and 317 guests