1 | <?php |
||
18 | class WebSocketManager implements MessageComponentInterface |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @var LoggerInterface the logger |
||
23 | */ |
||
24 | private $_logger; |
||
25 | |||
26 | /** |
||
27 | * @var \SplObjectStorage the connected clients |
||
28 | */ |
||
29 | private $_connectedClients; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * WebSocketEventHandler constructor. |
||
34 | * |
||
35 | * @param LoggerInterface $logger |
||
36 | */ |
||
37 | public function __construct(LoggerInterface $logger) |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @param InstanceStatusUpdatesEvent $event |
||
46 | */ |
||
47 | public function onInstanceStatusUpdates(InstanceStatusUpdatesEvent $event) |
||
58 | |||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function onOpen(ConnectionInterface $conn) |
||
68 | |||
69 | |||
70 | /** |
||
71 | * @inheritdoc |
||
72 | */ |
||
73 | public function onClose(ConnectionInterface $conn) |
||
78 | |||
79 | |||
80 | /** |
||
81 | * @inheritdoc |
||
82 | */ |
||
83 | public function onError(ConnectionInterface $conn, \Exception $e) |
||
87 | |||
88 | |||
89 | /** |
||
90 | * @inheritdoc |
||
91 | */ |
||
92 | public function onMessage(ConnectionInterface $from, $msg) |
||
96 | |||
97 | } |
||
98 |