From c0bc0e3dfe1a0660c70c05df14ea0b53ec6701b7 Mon Sep 17 00:00:00 2001 From: sergeych Date: Tue, 18 Feb 2025 11:31:21 +0300 Subject: [PATCH] fix some ktor deprecations --- .../kotlin/net/sergeych/kiloparsec/adapter/UdpBlock.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ktorSocketMain/kotlin/net/sergeych/kiloparsec/adapter/UdpBlock.kt b/src/ktorSocketMain/kotlin/net/sergeych/kiloparsec/adapter/UdpBlock.kt index 89b665a..37342b5 100644 --- a/src/ktorSocketMain/kotlin/net/sergeych/kiloparsec/adapter/UdpBlock.kt +++ b/src/ktorSocketMain/kotlin/net/sergeych/kiloparsec/adapter/UdpBlock.kt @@ -2,6 +2,7 @@ package net.sergeych.kiloparsec.adapter import io.ktor.network.sockets.* import io.ktor.utils.io.core.* +import kotlinx.io.readByteArray import net.sergeych.crypto2.toDump import net.sergeych.kiloparsec.adapter.UdpBlock.Companion.CANCEL_BLOCK import net.sergeych.kiloparsec.adapter.UdpBlock.Companion.ESCAPE_BYTE @@ -97,6 +98,6 @@ sealed class UdpBlock { } fun decode(datagram: Datagram) = - decode(datagram.packet.readBytes().toUByteArray()) + decode(datagram.packet.readByteArray().toUByteArray()) } } \ No newline at end of file