class AsyncHttp1Writer
source · line 12public
public class AsyncHttp1Writer internal constructor(
private val state: H1State,
private val body: H1Output
) : AsyncByteSink, AsyncCloseable
- Supertype
AsyncByteSink - Supertype
AsyncCloseable
The single active output body of an HTTP/1 exchange. Explicit finish writes the selected framing terminator and trailers.
function writeFrom
source · line 32public
public override suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
- Overrides
writeFrom
Writes body bytes according to the selected framing, allowing short progress.
parameter count
source · line 32public
count: Long
parameter buffer
source · line 32public
buffer: NativeByteBuffer
function flush
source · line 69public
public override suspend fun flush(): Unit
- Overrides
flush
Drains accepted output and flushes the transport without ending the body.
property isComplete
source · line 20public
public val isComplete: Boolean
get: public read-only
Whether the output message was finished successfully.
getter get
source · line 20public
get(): Boolean
function close
source · line 118public
public override suspend fun close(): Unit
- Overrides
close
Closes the writer; abandoning unfinished output closes the connection rather than pretending a complete message was sent.
function finish
source · line 92public
public suspend fun finish(trailers: List<HttpField> = ArrayList<HttpField>()): Unit
Finishes the selected body framing and sends allowed trailers, then completes this writer.
parameter trailers
source · line 92public
trailers: List<HttpField> = ArrayList<HttpField>()