class Http1Decoder
source · line 47public class Http1Decoder private constructor(
private var handle: ULong,
/**
* The fixed client/server role of this codec.
*/
public val role: HttpRole
) : Closeable
- Supertype
Closeable - Inherited
fun dispose(): Unit· Closeable
An incremental in-memory HTTP/1 decoder. Register client request methods in order, feed bytes, and drain events; serialize operations on one instance and close it explicitly.
property isClosed
source · line 110public val isClosed: Boolean
get: public read-only
Whether its state has been released.
getter get
source · line 110get(): Boolean
property role
source · line 52public val role: HttpRole
get: public read-only
The fixed client/server role of this codec.
function expectResponse
source · line 150public fun expectResponse(method: List<Byte>): Unit
Queues the exact request method before client response parsing, enabling HEAD and CONNECT response semantics.
parameter method
source · line 150method: List<Byte>
function endInput
source · line 197public fun endInput(): Unit
Reports transport EOF and validates whether the protocol input ended cleanly.
property isSwitched
source · line 114public val isSwitched: Boolean
get: public read-only
Whether parsing stopped at a protocol-switch boundary.
getter get
source · line 114get(): Boolean
function receive
source · line 172public fun receive(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Long
Consumes up to count readable input bytes, advancing the buffer by the returned count. Drain queued events after feeding input.
parameter count
source · line 172count: Long = buffer.readableBytes
parameter buffer
source · line 172buffer: NativeByteBuffer
function close
source · line 285public override fun close(): Unit
- Overrides
close
Releases codec state without sending, finishing, or closing a transport.
function resumeHttp1
source · line 223public fun resumeHttp1(): Unit
Resumes HTTP/1 parsing after the server declines a candidate upgrade.
function receiveWithProgress
source · line 207public fun receiveWithProgress(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Http1ReceiveResult
Consumes input and also reports how many messages started during this call.
parameter count
source · line 209count: Long = buffer.readableBytes
parameter buffer
source · line 208buffer: NativeByteBuffer
function nextEvent
source · line 233public fun nextEvent(): Http1Event?
Removes the next queued event, or returns None when none is ready.