Builder
Configuration builder for StdioServerTransport. Used via the StdioServerTransport(input, output) { ... } factory; the I/O endpoints are supplied positionally, while scope, handlerDispatcher, and ioDispatcher are configurable inside the block.
Example:
StdioServerTransport(input, output) {
scope = CoroutineScope(SupervisorJob() + Dispatchers.Default)
handlerDispatcher = myHandlerDispatcher
ioDispatcher = Dispatchers.IO
}Properties
Dispatcher for invoking the registered message handler. Defaults to Dispatchers.Default.
Dispatcher for the reader and writer coroutines. Must allow at least two threads to run concurrently so the reader and writer don't block each other. The default is a two-thread view of the platform I/O dispatcher (IODispatcher.limitedParallelism(2)); pass a different value to share or isolate I/O threads with the rest of your application.
Optional caller-supplied CoroutineScope. When non-null, the transport's pipeline coroutines run as children of this scope and the transport does not tear it down on close. When null, the transport creates and owns an internal scope.