Package-level declarations

Types

Link copied to clipboard

Default CIO selector manager implementation

Link copied to clipboard
class ClosedChannelCancellationException : CancellationException
Link copied to clipboard
Link copied to clipboard
expect interface Selectable

A selectable entity with selectable NIO channel, interestedOps subscriptions.

actual interface Selectable : Closeable, DisposableHandle
actual interface Selectable
Link copied to clipboard

Select interest kind.

Select interest kind

Select interest kind

Link copied to clipboard
expect interface SelectorManager : CoroutineScope, Closeable

SelectorManager interface allows Selectable wait for SelectInterest.

actual interface SelectorManager : CoroutineScope, Closeable

Selector manager is a service that manages NIO selectors and selection threads

actual interface SelectorManager : CoroutineScope, Closeable
Link copied to clipboard

Base class for NIO selector managers

Link copied to clipboard

Functions

Link copied to clipboard
inline fun <C : Closeable, R> SelectorManager.buildOrClose(create: SelectorProvider.() -> C, setup: C.() -> R): R

Creates a NIO entity via create and calls setup on it. If any exception happens then the entity will be closed and an exception will be propagated.

Link copied to clipboard
expect fun SelectorManager(dispatcher: CoroutineContext = EmptyCoroutineContext): SelectorManager

Creates the selector manager for current platform.