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

Client connection pooling #121

Open
wants to merge 2 commits into
base: client.dns_resolver
Choose a base branch
from
Open

Conversation

daurnimator
Copy link
Owner

@daurnimator daurnimator commented Aug 23, 2018

WIP.

Will close #10

@daurnimator daurnimator force-pushed the client.pooling branch 2 times, most recently from f12647f to 073392a Compare August 23, 2018 17:31
if h2_settings then
-- TODO: check (and possibly change on connection?)
return false
end
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should check MAX_CONCURRENT_STREAMS

end

if candidate.version < 2 then
-- Check if connection already in use (avoid pipelining)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: check pipeline depth instead.
Also, might want to find shortest pipeline in the pool?

end

-- Check to see if connection has been closed
local ok, err = candidate.socket:fill(1, 0)
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Factor out into a "is alive" function. Can be reused for cleaning the pool

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

Successfully merging this pull request may close these issues.

1 participant