Skip to content

Commit

Permalink
Fix breakage from ksrpcuri removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Monkopedia committed Oct 30, 2022
1 parent 2e9c7b7 commit a98bd06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions ksrpc-ktor/server/src/commonMain/kotlin/HttpStream.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 <reified T : RpcService> Routing.serve(
basePath: String,
service: T,
Expand Down

0 comments on commit a98bd06

Please sign in to comment.