proc hash(x: SocketHandle): Hash {.borrow.}
-
Source
proc `$`(x: SocketHandle): string {.borrow.}
-
Source
proc register(s: Selector; fd: SocketHandle; events: set[Event]; data: SelectorData): SelectorKey {.
discardable, raises: [], tags: [].}
-
Registers file descriptor fd to selector s with a set of Event events.
Source
proc update(s: Selector; fd: SocketHandle; events: set[Event]): SelectorKey {.
discardable, raises: [], tags: [].}
-
Updates the events which fd wants notifications for.
Source
proc unregister(s: Selector; fd: SocketHandle): SelectorKey {.discardable, raises: [],
tags: [].}
-
Unregisters file descriptor fd from selector s.
Source
proc close(s: Selector) {.raises: [], tags: [].}
-
Closes the selector
Source
proc select(s: Selector; timeout: int): seq[ReadyInfo] {.raises: [], tags: [].}
-
The events field of the returned key contains the original events for which the fd was bound. This is contrary to the events field of the ReadyInfo tuple which determines which events are ready on the fd.
Source
proc newSelector(): Selector {.raises: [], tags: [].}
-
Creates a new selector
Source
proc contains(s: Selector; fd: SocketHandle): bool {.raises: [], tags: [].}
-
Determines whether selector contains a file descriptor.
Source
proc `[]`(s: Selector; fd: SocketHandle): SelectorKey {.raises: [], tags: [].}
-
Retrieves the selector key for fd.
Source
proc contains(s: Selector; key: SelectorKey): bool {.raises: [], tags: [].}
-
Determines whether selector contains this selector key. More accurate than checking if the file descriptor is in the selector because it ensures that the keys are equal. File descriptors may not always be unique especially when an fd is closed and then a new one is opened, the new one may have the same value.
Source