ktor-io / io.ktor.utils.io / WriterScope

WriterScope

interface WriterScope : CoroutineScope

Properties

channel

abstract val channel: ByteWriteChannel

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