Skip to content
docsv0.17.0

HttpSignatureProbe

The real signature probe: one `GET <path> HTTP/1.0` to the loopback host, reading the status line only. It reads the STATUS LINE and closes: a service whose right answer is a stream (a hub subscription) must not hold the reader, and the status is what a protocol obliges. Anything that is not an HTTP status line within the timeout — a refused connect, a program that speaks another protocol, silence — is `null`, never an exception: a reader reports it, it does not raise it.

HttpSignatureProbe::__construct()

public function __construct(string $host = Milpa\Runtime\Stack\TcpProbe::HOST):

Parameters

Parameters of __construct()
NameTypeDescription
$hoststringthe host to ask — the same loopback address the reachability probe tried

HttpSignatureProbe::answer()

public function answer(int $port, Milpa\Runtime\Stack\ServiceSignature $signature): ?int

The status the program on the port answered `GET <path>` with, or null when no HTTP status line came back.

Parameters

Parameters of answer()
NameTypeDescription
$portint
$signatureMilpa\Runtime\Stack\ServiceSignature