StdioClientTransport

class StdioClientTransport(input: Source, output: Sink) : AbstractTransport(source)

A transport implementation for JSON-RPC communication that leverages standard input and output streams.

This class reads from an input stream to process incoming JSON-RPC messages and writes JSON-RPC messages to an output stream.

Parameters

input

The input stream where messages are received.

output

The output stream where messages are sent.

Constructors

Link copied to clipboard
constructor(input: Source, output: Sink)

Functions

Link copied to clipboard
open suspend override fun close()
Link copied to clipboard
open override fun onClose(block: () -> Unit)
Link copied to clipboard
open override fun onError(block: (Throwable) -> Unit)
Link copied to clipboard
open override fun onMessage(block: suspend (JSONRPCMessage) -> Unit)
Link copied to clipboard
open suspend override fun send(message: JSONRPCMessage)
Link copied to clipboard
open suspend override fun start()