1 | <?php |
||
11 | class HealthHandler implements HttpServerInterface |
||
12 | { |
||
13 | /** |
||
14 | * Handle the socket opening. |
||
15 | * |
||
16 | * @param \Ratchet\ConnectionInterface $connection |
||
17 | * @param \Psr\Http\Message\RequestInterface $request |
||
18 | * @return void |
||
19 | */ |
||
20 | public function onOpen(ConnectionInterface $connection, RequestInterface $request = null) |
||
30 | |||
31 | /** |
||
32 | * Handle the incoming message. |
||
33 | * |
||
34 | * @param \Ratchet\ConnectionInterface $connection |
||
35 | * @param string $message |
||
36 | * @return void |
||
37 | */ |
||
38 | public function onMessage(ConnectionInterface $connection, $message) |
||
42 | |||
43 | /** |
||
44 | * Handle the websocket close. |
||
45 | * |
||
46 | * @param \Ratchet\ConnectionInterface $connection |
||
47 | * @return void |
||
48 | */ |
||
49 | public function onClose(ConnectionInterface $connection) |
||
53 | |||
54 | /** |
||
55 | * Handle the websocket errors. |
||
56 | * |
||
57 | * @param \Ratchet\ConnectionInterface $connection |
||
58 | * @param WebSocketException $exception |
||
59 | * @return void |
||
60 | */ |
||
61 | public function onError(ConnectionInterface $connection, Exception $exception) |
||
65 | } |
||
66 |