libev 썸네일형 리스트형 ANATOMY OF A WATCHER ANATOMY OF A WATCHER A watcher is a structure that you create and register to record your interest in some event. For instance, if you want to wait for STDIN to become readable, you would create an ev_io watcher for that. static void my_cb (struct ev_loop *loop, struct ev_io *w, int revents) { ev_io_stop (w); ev_break (loop, EVUNLOOP_ALL); } struct ev_loop *loop = ev_default_loop (0); struct ev_.. 더보기 libev - some functions controlling the event loop Functions Controlling the Event Loop An event loop is described by a struct ev_loop*.The library knows two types of such loop, the default loop, and dynamically created loops. struct ev_loop *ev_default_loop(unsigned int flags)This will initialize the default event loop if it hasn't been initialized yet and return it.If the default loop could not be initialized, return false.If it already was in.. 더보기 이전 1 다음