TCP: fixes backlog limit handling, and allows ephemeral TCP connections by d-a-v · Pull Request #7096 · esp8266/Arduino (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation4 Commits4 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
When a sketch does not check server::available()
often enough, short connections are now received and stored in background (backlog limit number of connections at most) and can be retrieved and used by subsequent client = server::available()
. Those clients will be status() == CLOSED
, connected() == false
but available() > 0
.
@kirillandy Could you check this ? I get what's expected by #2569 with these changes.
@JAndrassy This is still not what you are waiting for but it would be nice if you checked nothing has changed on the arduino side (WiFiClient::operator bool()
has changed).
fixes #2569
edit:
fixes #7103
Hi @d-a-v ! Currently trying to check your changes out, but I'm not too certain about my actions.
So I installed the current ESP Arduino library version using Git (as the docs instruct). After a bit of research I then used "git merge https://github.com/d-a-v/Arduino.git FixBacklogHonorEphemeral" to apply your changes on what I have locally stored on my PC.
Is that all I need to do before I compile my code to test out on my ESPs?
(Also, if my actions were correct, was there an easier way to do what I did? :D)
UPDATE:
So, if everything I did to get hold of your commit was correct (still need some friendly guidance on that, since this is my first time properly using Git and its commands :)), then everything works like a charm! I repeated my previous experiment by sending a few bytes when the server was not available-looping and the server was able to get the client and read the bytes 👍
I also tried sending bytes in 3 different connections one after the other to check if they'd all be in the queue and the server managed to .available() all 3 and read every message.
Thanks a lot for your work, @d-a-v!
d-a-v mentioned this pull request
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
d-a-v deleted the FixBacklogHonorEphemeral branch