-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Systemd Socket Activation - File Descriptor with HTTP Server #164
Comments
Thank you for bringing this up! Right now, this component does not support listening on existing file descriptors and I think this would be a very useful addition to this package! PHP does technically support this via the I've just looked into this again and the existing component is pretty much already compatible with this except that this needs to use Implementing this as part of this package means that we would have to come up with some tests to verify correct execution. PHP does not currently expose a sane way to access the underlying file descriptor for an existing socket or stream resource (https://stackoverflow.com/questions/5600811/fopen-and-getting-system-file-descriptor, reactphp/child-process#51 and maybe https://github.com/YuriyNasretdinov/phprocksyd/blob/master/php-fd.patch). On Linux, we may use Long story short, here's a gist with a WIP version of a Maybe somebody else feels like giving this a try or looking into this? Any feedback is appreciated 👍 |
This would be really nice to improve security when listening privileged ports |
accept()
race condition when multiple socket servers listen on same socket address
#244
How do I start
\React\Socket\Server
using systemd socket activation? There would need to be a way to accept a file descriptor from systemd, and then use that file descriptor to instantiate\React\Socket\Server
.The text was updated successfully, but these errors were encountered: