Skip to content
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 and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HttpClient improvements. Added support for servers that do not support connection reuse. #2132

Merged
merged 3 commits into from
Nov 3, 2020

Conversation

slaff
Copy link
Contributor

@slaff slaff commented Oct 29, 2020

  • Add onClose callbacks to TcpConnection. Useful for retries and reacting on closing a connection. Will not be called if there was no connection at all.
  • HttpClient now works with servers that don't support Tcp connection re-usage.

@slaff slaff changed the title Add onClosed callback that should be called when a tcp connection is … [WIP] Add onClosed callback that should be called when a tcp connection is … Oct 29, 2020
  - Respect Connection:close header
  - Wait for non GET/HEAD responses to be delivered completely before starting the next request.
- Clean inactive HttpClientConnections periodically.
@slaff slaff added this to the 4.2.0 milestone Nov 1, 2020
@slaff slaff requested a review from mikee47 November 1, 2020 09:30
@slaff slaff changed the title [WIP] Add onClosed callback that should be called when a tcp connection is … HttpClient improvements. Added support for servers that do not support connection reuse. Nov 1, 2020
slaff referenced this pull request Nov 3, 2020
* Minor refactoring

Trivial code moved into headers
NULL -> nullptr
int -> unsigned as appropriate
Remove un-necessary __forceinline directives

* Add `HttpClientConnection` class

Manages request queue and ssl information, so HttpClient only needs to track connections.
Also deal with SSLSessionId class.

* Rename `HttpRequest::request()` to `createRequest()`, deprecate old version
@slaff slaff merged commit 95ce25e into SmingHub:develop Nov 3, 2020
@mikee47
Copy link
Contributor

mikee47 commented Nov 4, 2020

@slaff Sorry for not reviewing, I did look through and nothing stuck out but didn't get around to testing it. I'll definitely give the UPnP stuff a proper check though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants