1: <?php
2:
3: namespace PHPFastCGI\FastCGIDaemon\ConnectionHandler;
4:
5: /**
6: * Objects implementing the connection handler interface are usually
7: * instantiated via some method with an incoming connection and a kernel. The
8: * handler is notified when these connections are ready to be read or closed and
9: * should handle communication between the incoming connection and the kernel.
10: */
11: interface ConnectionHandlerInterface
12: {
13: /**
14: * Triggered when the connection the handler was assigned to is ready to
15: * be read.
16: */
17: public function ready();
18:
19: /**
20: * Gracefully shutdown the connection being handled. Usually triggered
21: * following a SIGINT.
22: */
23: public function shutdown();
24:
25: /**
26: * Closes the connection handler and free's associated resources.
27: */
28: public function close();
29: }
30: