Chat freely about anything...

User avatar
By cnlohr
#26118 Until now, with all of my applications, I would see if there was room left in the TCP send buffer before sending packets, using: espconn_get_packet_info


Code: Select allint8_t TCPCanSend( struct espconn * conn, int size )
{
   struct espconn_packet infoarg;
   sint8 r = espconn_get_packet_info(conn, &infoarg);

   if( infoarg.snd_buf_size >= size && infoarg.snd_queuelen > 0 )
      return 1;
   else
      return 0;
}


But, in the newest release, if there is still buffer room left, and I try to send, I get an error sending and no packet is sent. I've modified my code to see if all packets have been sent and acked. Then and only then do I send another packet. While this solution works dandy for Linux, mobile, OSX, it's unlikely to work for many windows applications because of their pesky forced delayed acks.

Any idea if I need to do something to turn the ability to queue packets back on?

P.S. Tested with 1.2.0 a-okay, completely broken on both applications in 1.3.0.
User avatar
By cnlohr
#26271 Well, my architecture works much better with polling (and keeps it cross-platform with the AVR) BUT!!!

Without queuing packets, Windows- systems often behave very poorly, delaying their ack's. All of the SDKs up to this point supported queuing as well. That is a heck of a feature to drop, even if it was never fully supported.