class HttpCleartextProbe
source · line 50public
public class HttpCleartextProbe public constructor(allowed: List<HttpProtocol>)
Incrementally distinguishes the HTTP/2 client preface from HTTP/1, retaining consumed prefix bytes and leaving the remaining input untouched.
property prefix
source · line 66public
public val prefix: Array<Byte>
get: public read-only
A snapshot of all bytes consumed during probing, to pass to the selected protocol decoder.
getter get
source · line 66public
get(): Array<Int8>
constructor constructor
source · line 50public
constructor(allowed: List<HttpProtocol>)
parameter allowed
source · line 50public
allowed: List<HttpProtocol>
function receive
source · line 72public
public fun receive(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Long
Consumes only enough bytes to decide the protocol, preserving the remainder in the input buffer.
parameter count
source · line 72public
count: Long = buffer.readableBytes
parameter buffer
source · line 72public
buffer: NativeByteBuffer
function endInput
source · line 95public
public fun endInput(): HttpProtocol
Returns the selected protocol or rejects EOF during an incomplete preface.
property protocol
source · line 62public
public val protocol: HttpProtocol?
get: public read-only
The selected protocol, or None while the prefix remains ambiguous.
getter get
source · line 62public
get(): Option<HttpProtocol>