ktor-io / io.ktor.utils.io / ReaderScope

ReaderScope

interface ReaderScope : CoroutineScope

Properties

channel

abstract val channel: ByteReadChannel

Extension Functions

reader

fun CoroutineScope.reader(coroutineContext: <ERROR CLASS> = EmptyCoroutineContext, channel: ByteChannel, block: suspend ReaderScope.() -> Unit): ReaderJob
fun CoroutineScope.reader(coroutineContext: <ERROR CLASS> = EmptyCoroutineContext, autoFlush: Boolean = false, block: suspend ReaderScope.() -> Unit): ReaderJob

writer

fun CoroutineScope.writer(coroutineContext: <ERROR CLASS> = EmptyCoroutineContext, channel: ByteChannel, block: suspend WriterScope.() -> Unit): WriterJob
fun CoroutineScope.writer(coroutineContext: <ERROR CLASS> = EmptyCoroutineContext, autoFlush: Boolean = false, block: suspend WriterScope.() -> Unit): WriterJob