ByteReadChannelTransformer
Compiler-plugin target for ByteReadChannel parameters. Adapts ktor's ByteReadChannel onto the transport-agnostic RpcBinaryData surface used by ksrpc-core's BinaryTransformer.
The compiler plugin emits this transformer for ByteReadChannel service signatures; users opt in to ktor-io binary support by adding ksrpc-binary-ktor to their compile classpath (the ktor transports already do so transitively).
Functions
Link copied to clipboard
open suspend fun <S> transformOutcome(output: ByteReadChannel, channel: SerializedService<S>, encodeError: (Throwable) -> CallData.Error<S>): CallData<S>
Link copied to clipboard
open suspend override fun <T> untransform(data: CallData<T>, channel: SerializedService<T>): ByteReadChannel
Link copied to clipboard
open suspend fun <S> untransformOutcome(data: CallData<S>, channel: SerializedService<S>, decodeError: (CallData.Error<S>) -> Throwable): ByteReadChannel