LWIP netconn_sendto() blocking function?
Posted: Wed Apr 09, 2014 10:11 am
Hello,
I just wonder if netconn_sendto is a blocking function call, which returns AFTER the packet was sent, or if it returns immediately?
Since sending an UDP packet can lead to several subsequent actions (like ARP requests for unknown hosts), I guess that this happens in a background task, but I'm not sure about that.
If it is a background activity, how can I know when my packet was successfully sent?
I know there's no flow control for UDP, so when I say 'successfully', I mean that ARP was successful and the packet was put onto the media.
Is there some kind of callback or flag when the STM32 MAC FIFO is available for new outgoing packets?
Reason for my question is, I have a small test program which sends UDP packets in 10ms interval. When removing the network cable, a reset occurs after a few seconds.
Thank you,
Ruwe
I just wonder if netconn_sendto is a blocking function call, which returns AFTER the packet was sent, or if it returns immediately?
Since sending an UDP packet can lead to several subsequent actions (like ARP requests for unknown hosts), I guess that this happens in a background task, but I'm not sure about that.
If it is a background activity, how can I know when my packet was successfully sent?
I know there's no flow control for UDP, so when I say 'successfully', I mean that ARP was successful and the packet was put onto the media.
Is there some kind of callback or flag when the STM32 MAC FIFO is available for new outgoing packets?
Reason for my question is, I have a small test program which sends UDP packets in 10ms interval. When removing the network cable, a reset occurs after a few seconds.
Thank you,
Ruwe