-
Notifications
You must be signed in to change notification settings - Fork 134
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
how to use http_connect with keep-alive #87
Comments
Hi @stephenkgu , Thank you for your question and for opening this issue 🙏🏻 Your question is a very good question and it illuminates a design flaw in the current HTTP client. In theory, you could try to use the I believe what you are looking for is a smarter HTTP client feature, allowing you to send requests and receive results without the need to re-establish connections (even if they were lost). This is a feature that facil.io 0.7.x doesn't have even though it's possible to write one using the existing facil.io API. I would love to add this to the roadmap, maybe get it working for facil.io 0.9.0 (maybe even added to an 0.8.x releases)... but sadly I don't have time to work on this. The pieces for a "smart" client are already available. The HTTP/1.1 parser supports both client mode and server mode. You can easily write your own API / extension to make for a nice, persistent, HTTP client. If you make something nice, I would appreciate a PR. Maybe I can learn from your design and update the simple client to use a better approach. Thank you for opening this issue! Kindly, |
Thanks, I used facil for few months. It's a great work, plenty of useful features. But, I have few experiences with http client, and know little with facil. I will try to make a connection reuse client before the 0.9.0(or 0.8.x). Regards, |
I sent http request body with the first time on_response, and process the returned second time on_response body.
so, how can I keep a http client connection alive to reuse the http socket connection to some server? Can I do that? @boazsegev
Thanks
The text was updated successfully, but these errors were encountered: