Package io.ktor.network.selector

Types

Link copied to clipboard
class ActorSelectorManager(context: CoroutineContext) : SelectorManagerSupport, Closeable, CoroutineScope

Default CIO selector manager implementation

Link copied to clipboard
class ClosedChannelCancellationException : CancellationException
Link copied to clipboard
class InterestSuspensionsMap
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
expect enum SelectInterest : Enum<SelectInterest>

Select interest kind

actual enum SelectInterest : Enum<SelectInterest>

Select interest kind

actual enum SelectInterest : Enum<SelectInterest>

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
abstract class SelectorManagerSupport : SelectorManager

Base class for NIO selector managers

Link copied to clipboard
class SocketError

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.

actual fun SelectorManager(dispatcher: CoroutineContext = EmptyCoroutineContext): SelectorManager