ChannelTransport
constructor(sendChannel: SendChannel<JSONRPCMessage>, receiveChannel: ReceiveChannel<JSONRPCMessage>, dispatcher: CoroutineDispatcher = Dispatchers.Default)(source)
Initializes the transport with the specified SendChannel and ReceiveChannel.
Parameters
dispatcher
The coroutine dispatcher for the event loop. Defaults to Dispatchers.Default.
constructor(channel: Channel<JSONRPCMessage> = Channel(UNLIMITED), dispatcher: CoroutineDispatcher = Dispatchers.Default)(source)
Creates a ChannelTransport instance using a single channel for both sending and receiving messages.
This constructor simplifies the use of ChannelTransport in scenarios where a single channel is enough for bidirectional communication. A default channel with unlimited capacity is used if no channel is provided.
Parameters
channel
The Channel of JSONRPCMessage instances, used for both sending and receiving. Defaults to a channel with unlimited capacity.
dispatcher
The coroutine dispatcher for the event loop. Defaults to Dispatchers.Default.