diff --git a/src/DaemonFactoryInterface.php b/src/DaemonFactoryInterface.php index 001fd74..d022989 100644 --- a/src/DaemonFactoryInterface.php +++ b/src/DaemonFactoryInterface.php @@ -34,4 +34,16 @@ public function createDaemon(KernelInterface $kernel, DaemonOptions $options, in * @return DaemonInterface The FastCGI daemon */ public function createTcpDaemon(KernelInterface $kernel, DaemonOptions $options, string $host, int $port): DaemonInterface; + + /** + * Create a FastCGI daemon from a stream socket which is configured for + * accepting connections using the userland FastCGI implementation. + * + * @param KernelInterface $kernel The kernel to use for the daemon + * @param DaemonOptions $options The daemon configuration + * @param resource $socket The socket to accept connections from + * + * @return DaemonInterface The FastCGI daemon + */ + public function createDaemonFromStreamSocket(KernelInterface $kernel, DaemonOptions $options, $socket): DaemonInterface; } diff --git a/test/Helper/Mocker/MockDaemonFactory.php b/test/Helper/Mocker/MockDaemonFactory.php index 3343087..f1d8a68 100644 --- a/test/Helper/Mocker/MockDaemonFactory.php +++ b/test/Helper/Mocker/MockDaemonFactory.php @@ -20,4 +20,9 @@ public function createTcpDaemon(KernelInterface $kernel, DaemonOptions $options, { return $this->delegateCall('createTcpDaemon', func_get_args()); } + + public function createDaemonFromStreamSocket(KernelInterface $kernel, DaemonOptions $options, $socket): DaemonInterface + { + return $this->delegateCall('createDaemonFromStreamSocket', func_get_args()); + } }