mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-20 17:04:45 +08:00
Use kotlinx.io
This commit is contained in:
parent
ef29345d71
commit
0a64654a4f
@ -1,7 +1,7 @@
|
||||
package net.mamoe.mirai.qqandroid.io.serialization
|
||||
|
||||
import io.ktor.utils.io.core.Input
|
||||
import io.ktor.utils.io.core.Output
|
||||
import kotlinx.io.core.Input
|
||||
import kotlinx.io.core.Output
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialFormat
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.io.serialization.jce
|
||||
|
||||
import io.ktor.utils.io.core.*
|
||||
import kotlinx.io.core.*
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.Jce
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.JceCharset
|
||||
import net.mamoe.mirai.utils.io.readString
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.io.serialization.jce
|
||||
|
||||
import io.ktor.utils.io.core.Input
|
||||
import io.ktor.utils.io.core.Output
|
||||
import kotlinx.io.core.Input
|
||||
import kotlinx.io.core.Output
|
||||
import kotlinx.serialization.DeserializationStrategy
|
||||
import kotlinx.serialization.SerialFormat
|
||||
import kotlinx.serialization.SerializationStrategy
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.io.serialization.jce
|
||||
|
||||
import io.ktor.utils.io.core.Output
|
||||
import kotlinx.io.core.Output
|
||||
import kotlinx.serialization.SerialInfo
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.Jce
|
||||
|
||||
|
@ -2,7 +2,9 @@
|
||||
|
||||
package net.mamoe.mirai.qqandroid.io.serialization
|
||||
|
||||
import io.ktor.utils.io.core.*
|
||||
import kotlinx.io.core.EOFException
|
||||
import kotlinx.io.core.buildPacket
|
||||
import kotlinx.io.core.writeFully
|
||||
import kotlinx.serialization.MissingFieldException
|
||||
import kotlinx.serialization.Serializable
|
||||
import net.mamoe.mirai.qqandroid.io.serialization.jce.JceId
|
||||
@ -63,13 +65,13 @@ internal class JceInputTest {
|
||||
|
||||
writeJceHead(BYTE, 0)
|
||||
writeByte(2)
|
||||
listOf(listOf(1, 2, 3, 4), listOf(1, 2, 3, 4)).forEach {
|
||||
listOf(listOf(1, 2, 3, 4), listOf(1, 2, 3, 4)).forEach { child ->
|
||||
writeJceHead(LIST, 0)
|
||||
|
||||
writeJceHead(BYTE, 0)
|
||||
writeByte(it.size.toByte())
|
||||
writeByte(child.size.toByte())
|
||||
|
||||
it.forEach {
|
||||
child.forEach {
|
||||
writeJceHead(INT, 0)
|
||||
writeInt(it)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user