ProtocolOptions

open class ProtocolOptions(var enforceStrictCapabilities: Boolean = false, var timeout: Duration = DEFAULT_REQUEST_TIMEOUT, var handlerCoroutineContext: CoroutineContext = Dispatchers.Default, maxConcurrentHandlers: Int = DEFAULT_MAX_CONCURRENT_HANDLERS, maxInFlightHandlers: Int = DEFAULT_MAX_IN_FLIGHT_HANDLERS)(source)

Additional initialization options.

handlerCoroutineContext is read once when Protocol.connect attaches a transport and stays fixed until the next Protocol.connect.

Constructors

Link copied to clipboard
constructor(enforceStrictCapabilities: Boolean = false, timeout: Duration = DEFAULT_REQUEST_TIMEOUT, handlerCoroutineContext: CoroutineContext = Dispatchers.Default, maxConcurrentHandlers: Int = DEFAULT_MAX_CONCURRENT_HANDLERS, maxInFlightHandlers: Int = DEFAULT_MAX_IN_FLIGHT_HANDLERS)

Properties

Link copied to clipboard

whether to restrict emitted requests to only those the remote side advertised support for. Local-side capability checks are unaffected. Defaults to false for backward compatibility with SDK versions that did not advertise capabilities correctly.

Link copied to clipboard

coroutine context used to run inbound request and notification handlers once initialization has completed. Must contain a real dispatching kotlin.coroutines.ContinuationInterceptor. Dispatchers.Unconfined and unconfined test dispatchers are unsupported, since handler resumptions would then run on the transport read loop and reintroduce head-of-line blocking. Any kotlinx.coroutines.Job in this context is ignored.

Link copied to clipboard

default timeout for outgoing requests