- Sun Dec 21, 2014 10:16 am
#5320
Sprite_tm wrote:pvvx wrote:espconn_sent no changed in version 0.9.4.
Errors in esp-httpd to espconn_sent with the first versions. Transmit buffer can not be free until the end of data transfer to the client (up to confirm tcp stack - RX [ACK])
Not https://en.wikipedia.org/wiki/Nagle%27s_algorithm
You seem to 'know' an espconn_sent implies sending exactly one TCP packet. I assumed espconn_sent works more like scatter/gather; sending everything passed through to all the calls as one packet at the end of the callback. May I ask if you actually have sources to back up your claim, or are you just speculating it has something to do with Nagles algorithm?
Use Lwip:
tcp_nagle_enable ( struct tcp_pcb * aPcb ); // enable the nagle algorithm
tcp_nagle_disable ( struct tcp_pcb * aPcb ); // disable the nagle algorithm
tcp_nagle_disabled ( struct tcp_pcb * aPcb ); // return true if the algorithm is not enabled
espconn send not buffered - tcp_write(struct tcp_pcb * pcb, void * dataptr, u16_t len, u8_t apiflags = 0)
http://lwip.wikia.com/wiki/Raw/TCP+ When TCP stack receives data, espconn always confirms the acceptance of full size (~ 5600 bytes). Uses tcp_recved(). If you do not have time to process stream with Wi-Fi in the 1 megabyte per second, then there will be an overflow.
Espconn not used to throttle data reception. Espconn uses automatic update the TCP window for receiving data
there is no way to fix this in espconn...