diff --git a/ksrpc-ktor/client/src/commonMain/kotlin/HttpSerializedChannel.kt b/ksrpc-ktor/client/src/commonMain/kotlin/HttpSerializedChannel.kt index ebdcd624..0ec585da 100644 --- a/ksrpc-ktor/client/src/commonMain/kotlin/HttpSerializedChannel.kt +++ b/ksrpc-ktor/client/src/commonMain/kotlin/HttpSerializedChannel.kt @@ -16,8 +16,6 @@ package com.monkopedia.ksrpc.ktor.internal import com.monkopedia.ksrpc.ERROR_PREFIX -import com.monkopedia.ksrpc.KSRPC_BINARY -import com.monkopedia.ksrpc.KSRPC_CHANNEL import com.monkopedia.ksrpc.KsrpcEnvironment import com.monkopedia.ksrpc.RpcEndpointException import com.monkopedia.ksrpc.RpcFailure @@ -41,6 +39,9 @@ import io.ktor.utils.io.ByteReadChannel import kotlin.coroutines.CoroutineContext import kotlinx.serialization.json.Json +private const val KSRPC_BINARY = "binary" +private const val KSRPC_CHANNEL = "channel" + internal class HttpSerializedChannel( private val httpClient: HttpClient, private val baseStripped: String, diff --git a/ksrpc-ktor/server/src/commonMain/kotlin/HttpStream.kt b/ksrpc-ktor/server/src/commonMain/kotlin/HttpStream.kt index ba8a0f72..d84aa610 100644 --- a/ksrpc-ktor/server/src/commonMain/kotlin/HttpStream.kt +++ b/ksrpc-ktor/server/src/commonMain/kotlin/HttpStream.kt @@ -16,8 +16,6 @@ package com.monkopedia.ksrpc.ktor import com.monkopedia.ksrpc.ERROR_PREFIX -import com.monkopedia.ksrpc.KSRPC_BINARY -import com.monkopedia.ksrpc.KSRPC_CHANNEL import com.monkopedia.ksrpc.KsrpcEnvironment import com.monkopedia.ksrpc.RpcFailure import com.monkopedia.ksrpc.RpcService @@ -44,6 +42,9 @@ import io.ktor.utils.io.copyTo import kotlinx.coroutines.launch import kotlinx.serialization.json.Json +private const val KSRPC_BINARY = "binary" +private const val KSRPC_CHANNEL = "channel" + inline fun Routing.serve( basePath: String, service: T,