SingleChannelHost

A wrapper around a communication pathway that can be turned into a primary SerializedService.

Inheritors

Properties

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

The maximum ServiceTier this host supports. Defaults to ServiceTier.BIDI (full capability). Implementations with limited transport capabilities should override this to a lower tier.

Link copied to clipboard

A human-readable name for this transport, used in error messages when a service exceeds the supportedTier.

Functions

Link copied to clipboard
abstract suspend fun registerDefault(service: SerializedService<T>)

Register the primary service to be hosted on this communication channel.

Link copied to clipboard
inline suspend fun <T : RpcService, S> SingleChannelHost<S>.registerDefault(service: T)
suspend fun <T : RpcService, S> SingleChannelHost<S>.registerDefault(service: T, obj: RpcObject<T>)

Register a service to be hosted on the default channel.