Skip to content

Commit

Permalink
Update ktor to 3.0.2 (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
whyoleg authored Dec 6, 2024
1 parent 20e9834 commit ed67b75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kotlinx-coroutines = "1.9.0"
kotlinx-benchmark = "0.4.8"
kotlinx-bcv = "0.16.3"

ktor = "3.0.1"
ktor = "3.0.2"

netty = "4.1.115.Final"
netty-quic = "0.0.69.Final"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ private class KtorTcpConnection(
}
}

@OptIn(InternalAPI::class) // TODO?
@OptIn(InternalAPI::class)
private fun ByteWriteChannel.writeFrame(frame: Buffer) {
writeBuffer.writeInt24(frame.size.toInt())
writeBuffer.transferFrom(frame)
}

@OptIn(InternalAPI::class) // TODO?
@OptIn(InternalAPI::class)
private suspend fun ByteReadChannel.readFrame(): Buffer? {
while (availableForRead < 3 && awaitContent(3)) yield()
if (availableForRead == 0) return null
Expand Down

0 comments on commit ed67b75

Please sign in to comment.