HI, Some time ago I have asked a question below > > It is not clear from the API documentation if netconn_write function is > blocking or not? > > Did not actually get an answer but looking inside the code I got to the understanding that it is not blocking function if there are enough resources to send data.
But my problem is as following. I want to use netconn_write with NETCONN_NOCOPY flag. This requires fro the data to be stable during transmission. But I can't know for sure when transmission ends and the buffer can be used again. I need to implement something like that: fill_buffer( buf, DATA_0, sz ); netconn_write( netconn, buf, sz, NETCONN_NOCOPY ); BLOCK_WAITING_FOR_COMPLETION fill_buffer( buf, DATA_1, sz ); netconn_write( netconn, buf, sz, NETCONN_NOCOPY ); BLOCK_WAITING_FOR_COMPLETION and so on. How the "BLOCK_WAITING_FOR_COMPLETION" can be implemented? Without it a sequence shown about sends two buffers with DATA_1 both as DATA_0 buffer is overridden with DATA_1 before it got sent.
_______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
