mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-12 22:10:14 +08:00
Move output
to constructor argument
This commit is contained in:
parent
f50d8e3afb
commit
d7208a5ca7
@ -1,10 +1,7 @@
|
|||||||
package net.mamoe.mirai.qqandroid.network.io
|
package net.mamoe.mirai.qqandroid.network.io
|
||||||
|
|
||||||
import kotlinx.io.charsets.Charset
|
import kotlinx.io.charsets.Charset
|
||||||
import kotlinx.io.core.BytePacketBuilder
|
import kotlinx.io.core.*
|
||||||
import kotlinx.io.core.ExperimentalIoApi
|
|
||||||
import kotlinx.io.core.toByteArray
|
|
||||||
import kotlinx.io.core.writeFully
|
|
||||||
import kotlin.reflect.KClass
|
import kotlin.reflect.KClass
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -14,9 +11,9 @@ import kotlin.reflect.KClass
|
|||||||
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
@Suppress("unused", "MemberVisibilityCanBePrivate")
|
||||||
@UseExperimental(ExperimentalIoApi::class)
|
@UseExperimental(ExperimentalIoApi::class)
|
||||||
class JceOutput(
|
class JceOutput(
|
||||||
private val stringCharset: Charset = Charset.forName("GBK")
|
private val stringCharset: Charset = Charset.forName("GBK"),
|
||||||
|
private val output: Output = BytePacketBuilder()
|
||||||
) {
|
) {
|
||||||
private val output: BytePacketBuilder = BytePacketBuilder()
|
|
||||||
|
|
||||||
fun close() = output.close()
|
fun close() = output.close()
|
||||||
fun flush() = output.flush()
|
fun flush() = output.flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user