Pipe
Less than 1 minute
Pipe
class Pipe implements \Hazaar\Warlock\Connection\ConnectionProperties
bytesReceived
Total number of bytes received from stdin.
public int $bytesReceivedguid
public string $guidprotocol
Protocol encoder/decoder for packet payloads.
private Protocol $protocolbuffer
Incomplete receive buffer awaiting a line terminator.
private string $bufferMethods
__construct
public __construct(Protocol $protocol, ?string $guid): voidParameters
| Parameter | Type | Description |
|---|---|---|
$protocol | Protocol | packet protocol implementation |
$guid | string | optional connection identifier |
configure
Pipe transport has no runtime configuration options.
public configure(array $config): voidParameters
| Parameter | Type | Description |
|---|---|---|
$config | array |
getHost
Returns fixed host label for pipe transports.
public getHost(): stringgetPort
Returns fixed port value for pipe transports.
public getPort(): intconnect
Pipe transport is always considered connected.
public connect(): booldisconnect
Flushes stdout and marks pipe connection as closed.
public disconnect(): boolconnected
Pipe transport is always considered connected while process is alive.
public connected(): boolsend
Encodes and writes a packet to stdout.
public send(PacketType $command, mixed $payload): boolParameters
| Parameter | Type | Description |
|---|---|---|
$command | PacketType | |
$payload | mixed |
recv
Reads and decodes one packet from stdin.
public recv(mixed $payload, int $tvSec = 3, int $tvUsec): nullParameters
| Parameter | Type | Description |
|---|---|---|
$payload | mixed | |
$tvSec | int | |
$tvUsec | int |
processPacket
Extracts one newline-delimited packet from a buffered stream.
private processPacket(?string $buffer): stringParameters
| Parameter | Type | Description |
|---|---|---|
$buffer | string |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000