class PlatformEventLoop
source · line 14public class PlatformEventLoop internal constructor(
config: LoopBlockingConfig
) : EventLoop
- Supertype
EventLoop
A single-use platform event loop. Run it from outside a Job and outside another event loop; I/O requires an active job in this loop's context.
function resolve
source · line 44public override suspend fun resolve(host: OsString, port: Int, family: AddressFamily?): Array<
SocketAddress
>
- Overrides
resolve· EventLoop
Resolves the host and port, optionally restricted to one address family.
parameter family
source · line 44family: AddressFamily?
parameter host
source · line 44host: OsString
parameter port
source · line 44port: Int
function createDirectories
source · line 89public override suspend fun createDirectories(path: Path, mode: Int): Unit
- Overrides
createDirectories· EventLoop
Creates missing parent directories with the requested mode, subject to the process umask.
parameter path
source · line 89path: Path
parameter mode
source · line 89mode: Int
function metadata
source · line 67public override suspend fun metadata(path: Path, followLinks: Boolean): FileMetadata
- Overrides
metadata· EventLoop
Queries filesystem metadata, optionally following symbolic links.
parameter path
source · line 67path: Path
parameter followLinks
source · line 67followLinks: Boolean
function connectTcp
source · line 107public override suspend fun connectTcp(address: SocketAddress): AsyncTcpStream
- Overrides
connectTcp· EventLoop
Connects to an IP endpoint, or resolves and races candidates using the supplied host connection options. The returned stream has independent ownership.
parameter address
source · line 107address: SocketAddress
function run
source · line 24public fun <T> run(block: suspend CoroutineScope.() -> T): T
Runs a root scope on the caller's thread until all children finish.
type parameter T
source · line 24T
parameter block
source · line 24block: suspend CoroutineScope.() -> T
function connectTcp
source · line 113public override suspend fun connectTcp(host: OsString, port: Int, options: TcpConnectOptions): AsyncTcpStream
- Overrides
connectTcp· EventLoop
Connects to an IP endpoint, or resolves and races candidates using the supplied host connection options. The returned stream has independent ownership.
parameter port
source · line 115port: Int
parameter host
source · line 114host: OsString
parameter options
source · line 116options: TcpConnectOptions
function sleep
source · line 33public override suspend fun sleep(duration: Duration): Unit
- Overrides
sleep· EventLoop
Suspends for a nonnegative duration and follows current-job cancellation.
parameter duration
source · line 33duration: Duration
function spawnPty
source · line 57public override suspend fun spawnPty(command: Command, columns: Long, rows: Long, searchPath: Boolean): AsyncPty
- Overrides
spawnPty· EventLoop
parameter rows
source · line 60rows: Long
parameter columns
source · line 59columns: Long
parameter searchPath
source · line 61searchPath: Boolean
parameter command
source · line 58command: Command
function deleteFile
source · line 83public override suspend fun deleteFile(path: Path): Unit
- Overrides
deleteFile· EventLoop
Deletes the selected filesystem entry.
parameter path
source · line 83path: Path
function listenTcp
source · line 121public override suspend fun listenTcp(address: SocketAddress, backlog: Int, reuseAddress: Boolean): AsyncTcpListener
- Overrides
listenTcp· EventLoop
Binds and listens for TCP connections with the requested backlog and address-reuse setting.
parameter address
source · line 122address: SocketAddress
parameter reuseAddress
source · line 124reuseAddress: Boolean
parameter backlog
source · line 123backlog: Int
function openDirectory
source · line 100public override suspend fun openDirectory(path: Path): AsyncDirectoryEntries
- Overrides
openDirectory· EventLoop
Opens an owned directory enumeration cursor.
parameter path
source · line 100path: Path
function attach
source · line 27public fun attach(host: EventLoopHost, onClosed: (Throwable?) -> Unit): EventLoopSession
Drives this scope from the existing host until shutdown and watch removal.
parameter onClosed
source · line 27onClosed: (Throwable?) -> Unit
parameter host
source · line 27host: EventLoopHost
property executor
source · line 21public override val executor: CoroutineExecutor
- Overrides
executor
get: public read-only
The owner executor for this active loop lifetime.
getter get
source · line 21get(): CoroutineExecutor
function moveFile
source · line 73public override suspend fun moveFile(source: Path, destination: Path, replaceExisting: Boolean): Unit
- Overrides
moveFile· EventLoop
Moves a filesystem entry, replacing the destination only when requested.
parameter source
source · line 74source: Path
parameter replaceExisting
source · line 76replaceExisting: Boolean
parameter destination
source · line 75destination: Path
function createTempFile
source · line 95public override suspend fun createTempFile(parent: Path?, prefix: String): TemporaryFile
- Overrides
createTempFile· EventLoop
Creates a unique temporary file and returns both its path and open handle.
parameter prefix
source · line 95prefix: String
parameter parent
source · line 95parent: Path?
function bindUdp
source · line 130public override suspend fun bindUdp(address: SocketAddress, reuseAddress: Boolean): AsyncUdpSocket
- Overrides
bindUdp· EventLoop
Binds an owned UDP socket, optionally enabling address reuse.
parameter address
source · line 131address: SocketAddress
parameter reuseAddress
source · line 132reuseAddress: Boolean
function schedule
source · line 38public override fun schedule(duration: Duration, completion: (Throwable?) -> Unit): Disposable
- Overrides
schedule· EventLoop
Registers a cancellable ordinary timer notification on this loop's owner.
parameter duration
source · line 38duration: Duration
parameter completion
source · line 38completion: (Throwable?) -> Unit
function openFile
source · line 51public override suspend fun openFile(path: Path, options: OpenOptions): AsyncFile
- Overrides
openFile· EventLoop
Opens an owned asynchronous file using explicit access, creation, and truncation options.
parameter options
source · line 51options: OpenOptions
parameter path
source · line 51path: Path
function openTty
source · line 56public override suspend fun openTty(): AsyncTty
- Overrides
openTty· EventLoop
Opens an owned asynchronous terminal handle.