NAME
Unblock::HTTP3::Capsule::Stream - Capsule Protocol over Extended CONNECT
SYNOPSIS
my $capsules = $tx->capsules;
$capsules->send(42, $bytes);
while (my $capsule = $capsules->next_capsule) {
...
}
$capsules->complete;
DESCRIPTION
A Capsule::Stream runs RFC 9297 Capsule framing over the streaming body directions of one Extended CONNECT Transaction.
On a client, create it after receiving a successful final response. On a server, configure the successful Response before creating it.
The object handles Capsule framing and parsing. It does not define the meaning of Capsule Types.
METHODS
send
my $can_continue = $capsules->send($type, $bytes);
Sends one Capsule.
The return value follows normal HTTP/3 body backpressure semantics. A false return means the bytes were accepted but the producer should pause.
next_capsule
Returns the next received Unblock::HTTP3::Capsule, or undef.
Polling only consumes underlying body bytes as needed, so normal receive-credit and buffering limits remain active.
complete
Half-closes the outgoing Capsule data stream.
is_receive_complete
True after the peer cleanly ends its Capsule data stream.
is_cancelled
True if the underlying Transaction was cancelled.
NOTES
Capsule Protocol negotiation belongs to the higher-level protocol.
Unblock::HTTP3 provides the generic RFC 9297 mechanism but does not invent protocol-specific negotiation rules.
SEE ALSO
Unblock::HTTP3::Transaction, Unblock::HTTP3::Capsule, Unblock::HTTP3::Capsule::Parser
AUTHOR
Joshua S. Day
LICENSE
This software is available under the MIT License.