ActorSelectorManager
class ActorSelectorManager :
SelectorManagerSupport,
Closeable,
CoroutineScope
Default CIO selector manager implementation
Constructors
ActorSelectorManager(dispatcher: <ERROR CLASS>) Default CIO selector manager implementation |
Properties
val coroutineContext: <ERROR CLASS> |
Inherited Properties
var cancelled: Int Number of cancelled keys |
|
var pending: Int Number of pending selectables |
|
val provider: SelectorProvider NIO selector provider |
Functions
fun close(): Unit Close selector manager and release all resources |
|
fun notifyClosed(s: Selectable): Unit Notifies the selector that selectable has been closed. |
|
fun publishInterest(selectable: Selectable): Unit Publish current selectable interest |
Inherited Functions
fun applyInterest(selector: Selector, s: Selectable): Unit Applies selectable’s current interest (should be invoked in selection thread) |
|
fun cancelAllSuspensions( Cancel all selectable’s suspensions with the specified exception Cancel all suspensions with the specified exception, reset all interests |
|
fun handleSelectedKey(key: SelectionKey): Unit Handles particular selected key |
|
fun handleSelectedKeys( Handle selected keys clearing selectedKeys set |
|
fun notifyClosedImpl( Notify selectable’s closure |
|
suspend fun select( Suspends until interest is selected for selectable May cause manager to allocate and run selector instance if not yet created. |
Extension Functions
fun <C : Closeable, R> SelectorManager.buildOrClose( 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. |
|
fun CoroutineScope.decodeChunked( Start a chunked stream decoder coroutine |
|
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> CoroutineScope.embeddedServer( Creates an embedded server with the given factory, listening on host:port |
|
fun CoroutineScope.httpServer( Start an http server with settings invoking handler for every request |
|
fun CoroutineScope.parseMultipart( fun CoroutineScope.parseMultipart( fun CoroutineScope.parseMultipart( Starts a multipart parser coroutine producing multipart events |
|
fun CoroutineScope.pinger( Launch pinger coroutine on CoroutineScope that is sending ping every specified period to outgoing channel, waiting for and verifying client’s pong frames. It is also handling timeout and sending timeout close frame fun CoroutineScope.pinger( Launch pinger coroutine on CoroutineScope that is sending ping every specified periodMillis to outgoing channel, waiting for and verifying client’s pong frames. It is also handling timeoutMillis and sending timeout close frame |
|
fun CoroutineScope.ponger( Launch a ponger actor job on the CoroutineScope sending pongs to outgoing channel. It is acting for every client’s ping frame and replying with corresponding pong |
|
fun CoroutineScope.startConnectionPipeline( Start connection HTTP pipeline invoking handler for every request. Note that handler could be invoked multiple times concurrently due to HTTP pipeline nature |
|
fun CoroutineScope.writeMultipleRanges( Start multirange response writer coroutine |