Skip to content

Adding DaemonFactoryInterface::createDaemonFromStreamSocket #60

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/DaemonFactoryInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
5 changes: 5 additions & 0 deletions test/Helper/Mocker/MockDaemonFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}