KrpcClient

kRPC implementation of the RpcClient. Takes care of tracking requests and responses, serializing data, tracking streams, processing exceptions, and other protocol responsibilities. Leaves out the delivery of encoded messages to the specific implementations with KrpcTransport.

Inheritors

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
suspend fun awaitCompletion()

Waits until the client is closed.

Link copied to clipboard
suspend override fun <T> call(call: RpcCall): T
Link copied to clipboard
override fun <T> callServerStreaming(call: RpcCall): Flow<T>
Link copied to clipboard
fun close(message: String? = null)

Close this client, removing all the services and stopping accepting messages.

Link copied to clipboard
protected abstract fun initializeConfig(): KrpcConfig.Client

Called once to provide KrpcConfig.Client for this client. Called only after initializeTransport.

Link copied to clipboard
protected abstract suspend fun initializeTransport(): KrpcTransport

Called once to provide KrpcTransport for this client.