I want to set socket.TCP_KEEPIDLE of a Pyro4 object for keeping heartbeat. Is there any way to do this? Or workaround is also welcome. Thanks in advance.
Asked
Active
Viewed 80 times
0
-
The socket is wrapped by the Pyro.Proxy, so that I don't know how to trigger like: socket.setsockopt(socket.SOL_TCP, socket.TCP_KEEPIDLE, 10) – Tom. W Jan 14 '20 at 08:00
-
The defaut setting is 7200s which is too long, the connection would be lost after 2-3 mins. – Tom. W Jan 14 '20 at 08:01
-
Is setting the SO_KEEPALIVE setting not good enough (which you can do via normal Pyro configuration settings)? – Irmen de Jong May 11 '20 at 15:12
1 Answers
0
If you really want, you can get to the actual socket
object in the Proxy via proxy._pyroConnection.sock
but then you're using an internal API, so no guarantees that your code keeps working.

Irmen de Jong
- 2,739
- 1
- 14
- 26