|
@@ 65-70 (lines=6) @@
|
| 62 |
|
public function command($command) |
| 63 |
|
{ |
| 64 |
|
if ('status 2' === $command) { |
| 65 |
|
if ('tcp://127.0.0.1:11940' === $this->socketAddress) { |
| 66 |
|
// send back the returnData as an array |
| 67 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/status_with_clients.txt')); |
| 68 |
|
} else { |
| 69 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/status_no_clients.txt')); |
| 70 |
|
} |
| 71 |
|
} elseif ('kill' === $command) { |
| 72 |
|
if ('tcp://127.0.0.1:11940' === $this->socketAddress) { |
| 73 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/kill_success.txt')); |
|
@@ 71-77 (lines=7) @@
|
| 68 |
|
} else { |
| 69 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/status_no_clients.txt')); |
| 70 |
|
} |
| 71 |
|
} elseif ('kill' === $command) { |
| 72 |
|
if ('tcp://127.0.0.1:11940' === $this->socketAddress) { |
| 73 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/kill_success.txt')); |
| 74 |
|
} else { |
| 75 |
|
return explode("\n", file_get_contents(__DIR__.'/data/socket/kill_error.txt')); |
| 76 |
|
} |
| 77 |
|
} |
| 78 |
|
} |
| 79 |
|
|
| 80 |
|
/** |