ChannelClient

A SerializedChannel that can call into sub-services.

This could be a bidirectional conduit like a Connection, or it could be a client only service such as http client.

Inheritors

Types

Link copied to clipboard
object Companion

Properties

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

Functions

Link copied to clipboard
abstract suspend fun call(channelId: ChannelId, endpoint: String, data: CallData<T>): CallData<T>
Link copied to clipboard
abstract suspend fun close()
abstract suspend fun close(id: ChannelId)
Link copied to clipboard
open suspend override fun defaultChannel(): SerializedService<T>

Get a SerializedService that is the default on this client (i.e. using DEFAULT channel id). This should act as the root service for most scenarios.

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
abstract suspend fun wrapChannel(channelId: ChannelId): SerializedService<T>

Takes a given channel id and creates a service wrapper to make calls on that channel.