I need to send 100 data packets of small (up to 16 bytes) but variable size. I'm using RAW API TCP server.
1. My first attempt was to do something like this: tcp_write( buf1 ... ) tcp_output( ... ) wait for completion tcp_write( buf2 ... ) tcp_output( ... ) wait for completion ... It worked but I noticed a relatively big latency (about 200ms or more) between arrival of buf_n and buf_n+1. Where does it come from? How lwip stack schedule an actual transmission upon receipt of tcp_output? 2. My second attempt was to post all data with tcp_write( buf_n, TCP_WRITE_FLAG_COPY ) and push it with tcp_output( ... ) It fails on TCP_SND_QUEUELEN check. Here I have a question about pbufs allocation. Are pbufs allocated dynamically (like malloc blocks) and why should a number of queue be limited by number of pbufs and not by total size of lwip memory pool? Now I do not know what to do. How to send my 100 buffers efficiently? Thanks. -- View this message in context: http://lwip.100.n7.nabble.com/Efficient-sending-small-data-packets-tp22041.html Sent from the lwip-users mailing list archive at Nabble.com. _______________________________________________ lwip-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/lwip-users
