fix some ktor deprecations

This commit is contained in:
Sergey Chernov 2025-02-18 11:31:21 +03:00
parent 2d593e4107
commit c0bc0e3dfe

View File

@ -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())
}
}