This commit is contained in:
2021-08-25 19:11:15 +08:00
parent 84703373a2
commit bd1f60623e
22 changed files with 689 additions and 975 deletions
+21 -1
View File
@@ -39,7 +39,7 @@ class ServerManager
public int $mode = SWOOLE_TCP;
private mixed $server = null;
private Server|null $server = null;
/**
@@ -161,6 +161,15 @@ class ServerManager
}
/**
* @return array
*/
public function getSetting(): array
{
return $this->server->setting;
}
/**
* @param array $ports
* @return array
@@ -431,6 +440,17 @@ class ServerManager
}
/**
* @param mixed $message
* @param int $workerId
* @return mixed
*/
public function sendMessage(mixed $message, int $workerId): mixed
{
return $this->server?->sendMessage($message, $workerId);
}
/**
* @param array $events
* @throws ReflectionException