Package-level declarations

Interfaces that serve as the abstraction layer across different communication mediums.

Interfaces that serve as the abstraction layer across different communication mediums.

Interfaces that serve as the abstraction layer across different communication mediums.

Interfaces that serve as the abstraction layer across different communication mediums.

Types

Link copied to clipboard
sealed class CallData<T>

Wrapper around data being serialized through calls. Could be a reference to a string for a serialized object or to binary data.

Link copied to clipboard

A SerializedChannel that can call into sub-services.

Link copied to clipboard
Link copied to clipboard
data class ChannelId(val id: String)
Link copied to clipboard

A bidirectional channel that can both host and call services/sub-services.

Link copied to clipboard

Generic interface for things that hold a context that is used when interacting with them.

Link copied to clipboard

A multi-channel interface for serialized communication, generally shouldn't need to interact directly with this, instead use either ChannelClient or ChannelHost to reference a SerializedService instead.

Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard

A bidirectional channel that can host one service in each direction (1 host and 1 client).

Link copied to clipboard

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

Functions

Link copied to clipboard
inline suspend fun <T : RpcService, R : RpcService, S> SingleChannelConnection<S>.connect(crossinline host: suspend (R) -> T)

Connects both default channels for a connection (incoming and outgoing).

@JvmName(name = "connectSerialized")
suspend fun <T> SingleChannelConnection<T>.connect(host: suspend (SerializedService<T>) -> SerializedService<T>)

Raw version of connect, performing the same functionality with SerializedService directly.

Link copied to clipboard
expect fun randomUuid(): String
actual fun randomUuid(): String
actual fun randomUuid(): String
actual fun randomUuid(): String
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.

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

Register a service to be hosted, the ChannelId ollocated to this service is returned. Generally this should not be called directly, as it will happen automatically when services are returned from KsMethod tagged methods.