std.poll [core] std.poll.READ pub const READ: int = 1 — Interest and fact: a read or accept would not park, including an end. std.poll.WRITE pub const WRITE: int = 2 — Interest and fact: room for a byte, or a write that would fail at once. std.poll.HANGUP pub const HANGUP: int = 4 — Fact: the other end hung up, accompanied by an applicable interest. std.poll.ERROR pub const ERROR: int = 8 — Fact: a host error, accompanied by the requested interest. std.poll.Waiter pub struct Waiter { set: int, kinds: List[int], handles: List[int], interests: List[int], count: int, } — An owned waiter holding at most 256 entries, named by stable keys. std.poll.Ready pub struct Ready { key: int, facts: int, } — One ready entry: its key and READ/WRITE/HANGUP/ERROR facts. std.poll.Events pub struct Events { meaning: int, ready: List[Ready], } — Every ready entry once, in runtime order (unspecified for a set), and one meaning taken off the queue, or 0. std.poll.open pub fn open() -> Waiter ! {io} — A new empty waiter; acquire its host set lazily at add/wait. std.poll.len pub fn len(w: Waiter) -> int — The number of entries added and not removed. std.poll.close pub fn close(take w: Waiter) -> () ! {io} — Close the set, consuming w, leaving its entry handles open. std.poll.add_file pub fn add_file(mut w: Waiter, f: fs.File, interest: int) -> int ! {invalid, io, unsupported} — Add f with READ, WRITE or both; return the lowest free key, stable until removal. std.poll.add_socket pub fn add_socket(mut w: Waiter, s: net.Socket, interest: int) -> int ! {invalid, io, unsupported} — Add a TCP or Unix stream with READ, WRITE or both. std.poll.add_listener pub fn add_listener(mut w: Waiter, l: net.Listener) -> int ! {invalid, io, unsupported} — Add l with READ (a pending connection). std.poll.modify pub fn modify(mut w: Waiter, key: int, interest: int) -> () ! {invalid, io} — Change key's interest to READ, WRITE or both. std.poll.remove pub fn remove(mut w: Waiter, key: int) -> () ! {invalid, io} — Remove key before closing its handle; the key becomes free. std.poll.wait pub fn wait(mut w: Waiter, meanings: int, deadline_ms: int) -> Events ! {invalid, io, unsupported} — Wait for every ready entry and one signal meaning, together.