Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 1 addition & 19 deletions core/src/commonMain/kotlin/kotlinx/rpc/RpcClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,6 @@ public interface RpcClient : CoroutineScope {
*/
public suspend fun <T> call(call: RpcCall): T

/**
* This method is used by generated clients to perform a call to the server.
*
* @param T type of the result
* @param serviceScope service's coroutine scope
* @param call an object that contains all required information about the called method,
* that is needed to route it properly to the server.
* @return actual result of the call, for example, data from the server
*/
@Deprecated(
"This method was primarily used for fields in RPC services, which are now deprecated. " +
"See https://kotlin.github.io/kotlinx-rpc/strict-mode.html fields guide for more information",
level = DeprecationLevel.ERROR,
)
public fun <T> callAsync(serviceScope: CoroutineScope, call: RpcCall): Deferred<T>

/**
* This method is used by generated clients to perform a call to the server
* that returns a streaming flow.
Expand All @@ -53,9 +37,7 @@ public interface RpcClient : CoroutineScope {
* that is needed to route it properly to the server.
* @return the actual result of the call, for example, data from the server
*/
public fun <T> callServerStreaming(call: RpcCall): Flow<T> {
error("Non-suspending server streaming is not supported by this client")
}
public fun <T> callServerStreaming(call: RpcCall): Flow<T>

/**
* Provides child [CoroutineContext] for a new [RemoteService] service stub.
Expand Down
11 changes: 0 additions & 11 deletions krpc/krpc-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,3 @@ kotlin {
}
}

rpc {
strict {
stateFlow = RpcStrictMode.NONE
sharedFlow = RpcStrictMode.NONE
nestedFlow = RpcStrictMode.NONE
streamScopedFunctions = RpcStrictMode.NONE
suspendingServerStreaming = RpcStrictMode.NONE
notTopLevelServerFlow = RpcStrictMode.NONE
fields = RpcStrictMode.NONE
}
}
Loading