Concurrent socket usage from multiple tasks
Posted: Tue Feb 21, 2017 9:49 pm
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()?
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()?