1 | <?php |
||
17 | final class UserlandDaemonFactory implements DaemonFactoryInterface |
||
18 | { |
||
19 | /** |
||
20 | * Create a FastCGI daemon listening on file descriptor using the |
||
21 | * userland FastCGI implementation. |
||
22 | * |
||
23 | * @param KernelInterface $kernel The kernel to use for the daemon |
||
24 | * @param DaemonOptions $options The daemon configuration |
||
25 | * @param int $fd file descriptor for listening defaults to FCGI_LISTENSOCK_FILENO |
||
26 | * |
||
27 | * @return UserlandDaemon |
||
28 | * |
||
29 | * @codeCoverageIgnore The FastCGI daemon |
||
30 | */ |
||
31 | public function createDaemon(KernelInterface $kernel, DaemonOptions $options, int $fd = DaemonInterface::FCGI_LISTENSOCK_FILENO): DaemonInterface |
||
41 | |||
42 | /** |
||
43 | * Create a FastCGI daemon listening for TCP connections on a given address |
||
44 | * using the userland FastCGI implementation. The default host is |
||
45 | * 'localhost'. |
||
46 | * |
||
47 | * @param KernelInterface $kernel The kernel to use for the daemon |
||
48 | * @param DaemonOptions $options The daemon configuration |
||
49 | * @param string $host The host to bind to |
||
50 | * @param int $port The port to bind to |
||
51 | * |
||
52 | * @return UserlandDaemon The FastCGI daemon |
||
53 | * |
||
54 | * @codeCoverageIgnore |
||
55 | */ |
||
56 | public function createTcpDaemon(KernelInterface $kernel, DaemonOptions $options, string $host, int $port): DaemonInterface |
||
67 | |||
68 | /** |
||
69 | * Create a FastCGI daemon from a stream socket which is configured for |
||
70 | * accepting connections using the userland FastCGI implementation. |
||
71 | * |
||
72 | * @param KernelInterface $kernel The kernel to use for the daemon |
||
73 | * @param DaemonOptions $options The daemon configuration |
||
74 | * @param resource $socket The socket to accept connections from |
||
75 | * |
||
76 | * @return UserlandDaemon The FastCGI daemon |
||
77 | */ |
||
78 | public function createDaemonFromStreamSocket(KernelInterface $kernel, DaemonOptions $options, $socket): DaemonInterface |
||
85 | } |
||
86 |