KRPCClient

class KRPCClient(connector: RPCClientConnector, runScope: CoroutineScope, frameSerializerFactory: TransportFrameSerializer.Factory, payloadSerializerFactory: PayloadSerializer.Factory, serviceRegistry: ServiceRegistry, sessionContextKeyRegistry: SessionContextKeyRegistry, sessionPlugins: List<SessionNodeExtension.Plugin>, additionalExtensions: List<RPCNodeExtension.Factory<*>>) : RPCTransport, CoroutineScope

Constructors

KRPCClient
Link copied to clipboard
common
fun KRPCClient(connector: RPCClientConnector, runScope: CoroutineScope, serializerRegistry: SerializerRegistry, serviceRegistry: ServiceRegistry = ServiceRegistry.Empty, sessionContextKeyRegistry: SessionContextKeyRegistry = SessionContextKeyRegistry.Empty, sessionPlugins: List<SessionNodeExtension.Plugin> = emptyList(), additionalExtensions: List<RPCNodeExtension.Factory<*>> = emptyList())

Functions

biStream
Link copied to clipboard
common
open suspend override fun <REQUEST, CLIENT_STREAM, RESPONSE> biStream(serviceCall: ColdBistreamCallDescription<REQUEST, CLIENT_STREAM, RESPONSE>, request: REQUEST, clientStream: Flow<CLIENT_STREAM>): Flow<RESPONSE>
clientStream
Link copied to clipboard
common
open suspend override fun <REQUEST, CLIENT_STREAM, RESPONSE> clientStream(serviceCall: ColdUpstreamCallDescription<REQUEST, CLIENT_STREAM, RESPONSE>, request: REQUEST, clientStream: Flow<CLIENT_STREAM>): RESPONSE
requireSession
Link copied to clipboard
common
suspend fun requireSession(): Session
run
Link copied to clipboard
common
suspend fun run()
serverStream
Link copied to clipboard
common
open suspend override fun <REQUEST, RESPONSE> serverStream(serviceCall: ColdDownstreamCallDescription<REQUEST, RESPONSE>, request: REQUEST): Flow<RESPONSE>
singleCall
Link copied to clipboard
common
open suspend override fun <REQUEST, RESPONSE> singleCall(serviceCall: SingleCallDescription<REQUEST, RESPONSE>, request: REQUEST): RESPONSE
start
Link copied to clipboard
common
fun start(): Job
stop
Link copied to clipboard
common
suspend fun stop()
withSession
Link copied to clipboard
common
suspend fun <T> withSession(block: Session.() -> T): T

Properties

coroutineContext
Link copied to clipboard
common
open override val coroutineContext: CoroutineContext