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