os.notify #
fn new #
fn new() !FdNotifier
new creates a new EpollNotifier The FdNotifier interface is returned to allow OS specific implementations without exposing the concrete type
interface FdEvent #
interface FdEvent {
fd int
kind FdEventType
}
interface FdNotifier #
interface FdNotifier {
mut:
add(fd int, events FdEventType, conf ...FdConfigFlags) !
modify(fd int, events FdEventType, conf ...FdConfigFlags) !
remove(fd int) !
wait(timeout time.Duration) []FdEvent
close() !
}
Backends should provide a new()?FdNotifier
function
enum FdConfigFlags #
@[flag]
enum FdConfigFlags {
edge_trigger
one_shot
wake_up
exclusive
}
enum FdEventType #
@[flag]
enum FdEventType {
read
write
peer_hangup
exception
error
hangup
}
struct C.epoll_event #
struct C.epoll_event {
events u32
data C.epoll_data_t
}