Protocol
Less than 1 minute
Protocol
Hazaar Application Protocol Class
The Application Protocol is a simple protocol developed to allow communication between parts of the Hazaar framework over the wire or other IO interfaces. It allows common information to be encoded/decoded between endpoints.
Properties
sid
private string $sidlastError
private string $lastErrorencoded
private bool $encoded = trueMethods
__construct
public __construct(string $sid, bool $encoded = true): voidParameters
| Parameter | Type | Description |
|---|---|---|
$sid | string | |
$encoded | bool |
getLastError
public getLastError(): stringencoded
public encoded(): boolencode
public encode(PacketType $type, mixed $payload): stringParameters
| Parameter | Type | Description |
|---|---|---|
$type | PacketType | |
$payload | mixed |
decode
public decode(string $packet, mixed $payload, ?int $time): PacketTypeParameters
| Parameter | Type | Description |
|---|---|---|
$packet | string | |
$payload | mixed | |
$time | int |
error
private error(string $msg): falseParameters
| Parameter | Type | Description |
|---|---|---|
$msg | string |
Generated by Hazaar API Doc Generator on Mon, 27 Oct 2025 13:01:29 +0000