name
Description:
string Worker::$name
Sets the name of the current Worker instance for easy identification of the process when running the status command. The default value is none if not set.
Example
use Workerman\Worker;
require_once __DIR__ . '/vendor/autoload.php';
$worker = new Worker('websocket://0.0.0.0:8484');
// Set the name of the instance
$worker->name = 'MyWebsocketWorker';
$worker->onWorkerStart = function($worker)
{
echo "Worker starting...\n";
};
// Run the worker
Worker::runAll();