| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class WebSocketServer extends AbstractServer |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * Events |
||
| 17 | */ |
||
| 18 | const OPEN_EVENT = 'open'; |
||
| 19 | const HANDSHAKE_EVENT = 'handshake'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @param Server $server |
||
| 23 | */ |
||
| 24 | public function __construct(Server $server) |
||
| 25 | { |
||
| 26 | $this->server = $server; |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param WebSocketServerBuilder $builder |
||
| 31 | * |
||
| 32 | * @return WebSocketServer |
||
| 33 | */ |
||
| 34 | public static function build(WebSocketServerBuilder $builder) |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param callable $callback |
||
| 43 | */ |
||
| 44 | public function onOpen(callable $callback) |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param callable $callback |
||
| 51 | */ |
||
| 52 | public function onHandshake(callable $callback) |
||
| 55 | } |
||
| 56 | } |
||
| 57 |