CommandClient class provides an API (also externally usable by a custom control script for Aerys) for controlling an Aerys instance.
Promises are resolved upon successful command transmission. They may fail with an
Exception in case of server unavailability.
The constructor expects a config path of an Aerys instance.
Restarts the Aerys instance. [This keeps the master process alive.]
Stops the Aerys instance.
# Stop the currently running server # $server is an instance of Server $command = new Aerys\CommandClient($server->getOption("configPath")); yield $command->stop(); # Successfully stopped server!