@@ -6,6 +6,6 @@ |
||
6 | 6 | { |
7 | 7 | |
8 | 8 | public function handle($payload) { |
9 | - echo 'привет я DemoListener - ' . $payload; |
|
9 | + echo 'привет я DemoListener - ' . $payload; |
|
10 | 10 | } |
11 | 11 | } |
12 | 12 | \ No newline at end of file |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * @return void |
17 | 17 | */ |
18 | 18 | public function setListeners(array $listeners): void { |
19 | - $this->listeners = $listeners; |
|
19 | + $this->listeners = $listeners; |
|
20 | 20 | } |
21 | 21 | |
22 | 22 | /** |
@@ -45,11 +45,11 @@ |
||
45 | 45 | |
46 | 46 | $this->tcpServer = new \React\Socket\TcpServer($ip . ':' . $port); |
47 | 47 | |
48 | - $this->tcpServer->on('connection', function (ConnectionInterface $connection) { |
|
48 | + $this->tcpServer->on('connection', function(ConnectionInterface $connection) { |
|
49 | 49 | |
50 | 50 | $connection->pipe($connection); |
51 | 51 | |
52 | - $connection->on('data', function ($payload) { |
|
52 | + $connection->on('data', function($payload) { |
|
53 | 53 | foreach ($this->listeners as $listener) { |
54 | 54 | $listener->handle($payload); |
55 | 55 | } |