SerializedService

Serialized version of a service. This can be transformed to and from a service using serialized and SerializedService.toStub.

Properties

Link copied to clipboard
Link copied to clipboard
abstract val env: KsrpcEnvironment<T>

Functions

Link copied to clipboard
open suspend fun call(endpoint: RpcMethod<*, *, *>, input: CallData<T>): CallData<T>
abstract suspend fun call(endpoint: String, input: CallData<T>): CallData<T>
Link copied to clipboard
abstract suspend fun close()
Link copied to clipboard
abstract suspend fun onClose(onClose: suspend () -> Unit)

Add a callback to be invoked when SuspendCloseable.close is called.

Link copied to clipboard
inline fun <T : RpcService, S> SerializedService<S>.toStub(): T

Convert a SerializedService to a T for use as a client.