How to enable TCP keep-alive communications? #1672
Unanswered
CastagnaIT
asked this question in
General
Replies: 1 comment 10 replies
-
We don't have any public API that'd allow you to do that, no. You'd probably need to monkey-patch |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
i am working on a multiplatform project and i am trying to do a migration from
Requests
module tohttpx
module,because i will need to use HTTP/2 in the near future but i do not know how to do with the TCP keep-alive communications.
The Requests module uses urllib3 which by default have disabled the TCP keep-alive communications,
then in order to enable the TCP keep-alive communications previously i had done this:
https://github.com/CastagnaIT/plugin.video.netflix/blob/master/resources/lib/services/tcp_keep_alive.py#L56
as you can see in the
enable_tcp_keep_alive
method i set socket options in order to enable it,and for Windows case only i use
ioctl
on the session adapter object to be able to enable itbut now how can i enable TCP keep-alive communications on httpx module?
can someone guide me?
Beta Was this translation helpful? Give feedback.
All reactions