| 1 | <?php |
||
| 11 | class Runner |
||
| 12 | { |
||
| 13 | private $app; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param Server $app |
||
| 17 | */ |
||
| 18 | public function __construct($app) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Listen to host:port |
||
| 25 | * @param string $port |
||
| 26 | * @param string $host |
||
| 27 | * @param array $cert |
||
| 28 | */ |
||
| 29 | public function listen($port, $host = '127.0.0.1', array $cert = []) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Setup socket for main loop |
||
| 38 | * @param LoopInterface $loop |
||
| 39 | * @param string $port |
||
| 40 | * @param string $host |
||
| 41 | * @param array $cert |
||
| 42 | */ |
||
| 43 | public function register(LoopInterface $loop, $port, $host = '127.0.0.1', array $cert = []) |
||
| 57 | } |
||
| 58 |