Source
Edit
Wrappers for Linux-specific epoll.
The epoll_ and EPOLL prefixes are removed.
Data {.bycopy, union.} = object
fd*: cint
u32*: uint32
u64*: uint64
-
Source
Edit
Ev = distinct uint32
-
Type used for epoll events.
Source
Edit
FD = distinct handles.FD
-
Type used for Epoll FDs
Source
Edit
func `and`(a, b: Ev): Ev {.borrow, ...raises: [], tags: [], forbids: [].}
-
Bitwise AND operator for Ev
Source
Edit
proc create(flags: cint): FD {.cdecl, importc: "epoll_create1", ...raises: [],
tags: [], forbids: [].}
-
Source
Edit
proc create(size: cint): FD {.cdecl, importc: "epoll_create", ...raises: [],
tags: [], forbids: [].}
-
Source
Edit
proc ctl(epfd: FD; op: CtlOp; fd: handles.FD; event: ptr Event): cint {.cdecl,
importc: "epoll_ctl", ...raises: [], tags: [], forbids: [].}
-
Source
Edit
proc ctl(epfd: FD; op: CtlOp; fd: handles.FD; event: var Event): cint {.cdecl,
importc: "epoll_ctl", ...raises: [], tags: [], forbids: [].}
-
Source
Edit
func has(a, b: Ev): bool {.inline, ...raises: [], tags: [], forbids: [].}
-
Check if b is in a
Source
Edit
func `not`(x: Ev): Ev {.borrow, ...raises: [], tags: [], forbids: [].}
-
Bitwise NOT operator for Ev
Source
Edit
func `or`(a, b: Ev): Ev {.borrow, ...raises: [], tags: [], forbids: [].}
-
Bitwise OR operator for Ev
Source
Edit
proc wait(epfd: FD; events: ptr UncheckedArray[Event]; maxevents: cint;
timeout: cint): cint {.cdecl, importc: "epoll_wait", ...raises: [],
tags: [], forbids: [].}
-
Source
Edit
proc wait(epfd: FD; events: var openArray[Event]; timeout: cint): cint {.inline,
...raises: [], tags: [], forbids: [].}
-
Source
Edit
converter toFD(epfd: FD): handles.FD {....raises: [], tags: [], forbids: [].}
-
All epoll fds are valid fds, not the other way around though
Source
Edit