InitializedKrpcClient

Represents an initialized KrpcClient that wraps a predefined config and transport parameters.

Parameters

config

configuration provided for that specific client. Applied to all services that use this client. See KrpcClient.initializeConfig.

transport

KrpcTransport instance that will be used to send and receive RPC messages. See KrpcClient.initializeTransport.

Constructors

Link copied to clipboard
constructor(config: KrpcConfig.Client, transport: KrpcTransport)

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 override fun initializeConfig(): KrpcConfig.Client

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

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

Called once to provide KrpcTransport for this client.