jvmMain.dev.inmo.tgbotapi.utils.asInput.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tgbotapi.core-jvm Show documentation
Show all versions of tgbotapi.core-jvm Show documentation
Core part of tgbotapi with all (and only) required functionality for working with Telegram Bot API
package dev.inmo.tgbotapi.utils
import io.ktor.utils.io.ByteReadChannel
import io.ktor.utils.io.core.Input
import io.ktor.utils.io.jvm.javaio.toInputStream
import io.ktor.utils.io.streams.asInput
import kotlinx.coroutines.job
import kotlin.coroutines.coroutineContext
actual suspend fun ByteReadChannel.asInput(): Input = toInputStream(coroutineContext.job).asInput()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy