1: <?php
2:
3: namespace PHPFastCGI\FastCGIDaemon\Connection;
4:
5: use PHPFastCGI\FastCGIDaemon\ConnectionHandler\ConnectionHandlerFactoryInterface;
6:
7: /**
8: * Objects implementing the ConnectionPoolInterface pass incoming connections
9: * off to ConnectionHandler instances that have been created from a connection
10: * handler factory.
11: */
12: interface ConnectionPoolInterface
13: {
14: /**
15: * Uses the connection handler factory to instantiate connection handlers
16: * when new connections are made to the connection pool. Monitors current
17: * connections and triggers them when read operations will not block.
18: *
19: * @param ConnectionHandlerFactoryInterface $connectionHandlerFactory The factory used to create connection handlers
20: * @param float $timeoutLoop The timeout value to use when waiting for activity on incoming connections
21: */
22: public function operate(ConnectionHandlerFactoryInterface $connectionHandlerFactory, $timeoutLoop);
23:
24: /**
25: * Shutdown the connection pool cleanly. Usually triggered following a
26: * SIGINT.
27: */
28: public function shutdown();
29: }
30: