I am using the MCUXPresso SDK version 2.2 with the Thread stack on the KW41Z.
The manual says that in order to receive a packet on a UDP socket, I must register a Session callback, initilialize the Session task, a message queue, etc. I want to use just the simple recv() function.
When I try that, it does not seem to work. Also I can not see how I could give the function a timeout, or tell it to block until a packet comes in, or use a function like select() to find out when a packet arrives. It just immediately returns and gives me an error (-1).
Please explain how I should use the recv() function to receive UDP packets on a socket.