class HttpTransport
source · line 10public
public class HttpTransport internal constructor(
private val stream: AsyncByteStream, private val owner: AsyncCloseable,
private val loop: EventLoop, private var prefix: Array<Byte>
) : AsyncByteStream, AsyncCloseable
- Supertype
AsyncByteStream - Supertype
AsyncCloseable
Owns a transport plus a preserved input prefix, allowing protocol handoff without losing bytes read past the previous protocol boundary.
function flush
source · line 70public
public override suspend fun flush(): Unit
- Overrides
flush
Flushes the underlying transport.
function readInto
source · line 41public
public override suspend fun readInto(buffer: NativeByteBuffer, count: Long): Long
- Overrides
readInto
Reads preserved prefix bytes first, then reads from the underlying transport.
parameter buffer
source · line 41public
buffer: NativeByteBuffer
parameter count
source · line 41public
count: Long
function writeFrom
source · line 61public
public override suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
- Overrides
writeFrom
Writes readable bytes to the owned transport.
parameter buffer
source · line 61public
buffer: NativeByteBuffer
parameter count
source · line 61public
count: Long
function close
source · line 79public
public override suspend fun close(): Unit
- Overrides
close
Closes the owned transport after active I/O cleanup.