Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By ponasP
#83402 I have a setup where a PC (windows 8) sends a one byte request to a server running on esp module and esp module then returns a 321 byte message. The problem is when the packet is lost, it seems that it takes around a second for the esp to re-transmit the message. Naggle is disabled. Is it expected? Is there some sort of time out before the re-transmission occurs? Can this be changed? See the wireshark exerpt.
wireshark.png
You do not have the required permissions to view the files attached to this post.
User avatar
By ponasP
#83406 Can this resend time-wait be adjusted? It seems that there are some parameters associated with this in lwip/opts.h, but I guess these options are compiled into the lwip library.

In application the data from esp has to be sent to my client almost real-time, delays should be less than <0.5second. My buffer is also not able to store more than a second of data.

rudy wrote:There is no specified time before a resend but three seconds is a typical value I have seen when looking at TCP re-transmission.
User avatar
By rudy
#83412 I have not looked at faster TCP options.

With games, TCP is too slow for quickly changing events. And what is often done is using UDP with multiple sends. A message ID count is used to determine if it has already been received. If it has it throws away the duplicate messages. Typically three messages are sent (with slight delays) and that should take care of any recoverable situations.