Client
Less than 1 minute
Client
Control class for Warlock
class Client extends \Hazaar\Warlock\ProcessThis class creates a connection to the Warlock server from within a Hazaar application allowing the application to send triggers or schedule tasks for delayed execution.
Properties
config
public array $configMethods
__construct
public __construct(array $clientConfig): voidParameters
| Parameter | Type | Description |
|---|---|---|
$clientConfig | array |
connect
public connect(?string $username, ?string $password): boolParameters
| Parameter | Type | Description |
|---|---|---|
$username | string | |
$password | string |
wait
Waits for a command to be received from the server and processes it.
public wait(int $seconds): boolThis is used in cases where the client needs to wait for a response from the server after sending a trigger or scheduling a task. If the server does not respond within the specified timeout, this method will return false.
Parameters
| Parameter | Type | Description |
|---|---|---|
$seconds | int | socket receive timeout in seconds |
createConnection
Creates the default socket connection for this client process.
protected createConnection(Protocol $protocol, ?string $guid): voidParameters
| Parameter | Type | Description |
|---|---|---|
$protocol | Protocol | protocol encoder/decoder |
$guid | string | optional connection identifier |
processCommand
protected processCommand(PacketType $command, ?\stdClass $payload): boolParameters
| Parameter | Type | Description |
|---|---|---|
$command | PacketType | |
$payload | \stdClass |
Generated by Hazaar API Doc Generator on Fri, 05 Jun 2026 06:08:15 +0000