Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
docs:techref:libubox [2023/03/20 12:33] – [libubox/uloop.h] fix type, style tatamidocs:techref:libubox [2023/03/20 12:33] (current) – [libubox/uloop.h] style tatami
Line 22: Line 22:
 The fd management part is set up with the uloop_fd struct, just adding the fd and the callback function you want called when an event arises. The rest of the structure is for internal use. The fd management part is set up with the uloop_fd struct, just adding the fd and the callback function you want called when an event arises. The rest of the structure is for internal use.
  
-The timeout management part is mostly prepared to do simple things. If you have the idea of doing something complex, you might want to have a look at libubox/runqueue.h which implements interesting functionality on top of uloop. +The timeout management part is mostly prepared to do simple things. If you want to do something complex, you might want to have a look at libubox/runqueue.h which implements interesting functionality on top of uloop. 
  
 Timeout structure should be initialized with just the callback and pending=false (timeout={.cb=cb_func} does the work), and added to uloop using uloop_timeout_set(), do not use the other _add() function because then you will need to set up the time yourself calling time.h functions. _set() uses _add() internally. Timeout structure should be initialized with just the callback and pending=false (timeout={.cb=cb_func} does the work), and added to uloop using uloop_timeout_set(), do not use the other _add() function because then you will need to set up the time yourself calling time.h functions. _set() uses _add() internally.
  • Last modified: 2023/03/20 12:33
  • by tatami