Support setting SOCKET options in react/socket like SO_KEEPALIVE #610
lucasnetau
started this conversation in
Ideas
Replies: 0 comments
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.
-
The belief (reactphp/socket#249) that sockets will just stay open is misguided when dealing with cloud systems, network load balancers and corporate firewalls. Idle connections may be dropped somewhere in the network path leading to stale connections.
Being able to set socket options like SO_KEEPALIVE on the stream servers/clients and their respective TCP_* flags would help in keeping these long running connections open (Encountered with Ratchet WS connections).
In TCPServer.php this was tested to work, however it's only a POC and not configurable:
Beta Was this translation helpful? Give feedback.
All reactions