Packet queuing broken in SDK 1.3.0?
Posted: Sat Aug 15, 2015 11:51 pm
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
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.
Code: Select all
int8_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.