Epoll

class Epoll

This class is currently the only method for using multiple sockets in one thread with having the blocking operation moved to epoll waiting so that it can block on multiple sockets at once. Once it has been called, you must release Srt context with Srt.cleanUp when application leaves.

See Also: Asynchronous operations (epoll)

Constructors

Link copied to clipboard
constructor()

Creates an epoll container.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Set or retrieves flags that change the default behavior of the epoll functions.

Link copied to clipboard

Tests if the Epoll is a valid one.

Functions

Link copied to clipboard
fun addUSock(socket: SrtSocket, events: List<EpollOpt>?)

Adds a socket to a epoll container.

Link copied to clipboard

Removes all SRT socket subscriptions from the epoll container.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun release()

Deletes the epoll container.

Link copied to clipboard
fun removeUSock(socket: SrtSocket)

Removes a specified socket from an epoll container.

Link copied to clipboard

Set flags that change the default behavior of the epoll functions. Same as flags but returns the effective list of EpollFlag.

Link copied to clipboard
fun updateUSock(socket: SrtSocket, events: List<EpollOpt>?)

Updates a socket to a epoll container.

Link copied to clipboard
fun uWait(timeout: Long, expectedEpollEventSize: Int = 2): List<EpollEvent>

Blocks a call until any readiness state occurs in the epoll container.

Link copied to clipboard
fun wait(timeout: Long, expectedReadReadySocketSize: Int = 2, expectedWriteReadySocketSize: Int = 2): Pair<List<SrtSocket>, List<SrtSocket>>

Blocks the call until any readiness state occurs in the epoll container.