0

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.

Tom. W
  • 43
  • 3
  • 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 Answers1

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