lwip_send + MSG_DONTWAIT, blocks forever

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi,

calling lwip_send does sometimes block forever where my understand is that the MSG_DONTWAIT flag should make sure the call never blocks at all.  I am using the WICED SDK Version 2.4.1.

Within the lwip_send function the netconn_write is what blocks:

err = netconn_write(sock->conn, data, size, write_flags);

What are the reasons this call could block?

0 Likes
2 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi,

If the queued messages for delivery are not sent out, the available buffer space get low and netconn_write(...) wait for the buffer to be available.

Please get a sniffer trace for queued message aretransmitted as expected or not.

Seyhan

0 Likes
Anonymous
Not applicable

Hi,

is there a way to get the queued messages or check the remaining buffer space?

I was under the impression that netconn_write with no_wait would return an error code if the buffer was full.

0 Likes