kike: implement the ping-pong and QUIT
This commit is contained in:
@@ -961,6 +961,15 @@ poller_timers_find (struct poller_timers *self,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
poller_timers_find_by_data (struct poller_timers *self, void *data)
|
||||
{
|
||||
for (size_t i = 0; i < self->len; i++)
|
||||
if (self->info[i].user_data == data)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void
|
||||
poller_timers_add (struct poller_timers *self,
|
||||
poller_timer_func dispatcher, void *data, int timeout_ms)
|
||||
|
||||
Reference in New Issue
Block a user