ReadSession

interface ReadSession

Deprecated

We're migrating to the new kotlinx-io library. This declaration is deprecated and will be removed in Ktor 4.0.0 If you have any problems with migration, please contact us in https://youtrack.jetbrains.com/issue/KTOR-6030/Migrate-to-new-kotlinx.io-library

Inheritors

Properties

Link copied to clipboard
abstract val availableForRead: Int

Number of bytes available for read. However, it does not necessarily mean that all available bytes could be requested at once

Functions

Link copied to clipboard
abstract fun discard(n: Int): Int

Discard at most n available bytes or 0 if no bytes available yet

Link copied to clipboard
abstract fun request(atLeast: Int = 1): ChunkBuffer?

Request buffer range atLeast bytes length