createLinkedPair

fun createLinkedPair(capacity: Int = 256, dispatcher: CoroutineDispatcher = Dispatchers.Default): ChannelTransport.LinkedTransports(source)

Creates a pair of interconnected ChannelTransport objects for bidirectional communication.

This method sets up a client and server transport using Kotlin channels, enabling messages sent through one transport to be received by the other. It is typically used for testing or in-memory communication without external networking.

Return

A LinkedTransports instance containing the client and server transports.

Parameters

capacity

The buffer capacity of the internal channels used for communication. Defaults to 256.