无限蚂蚁

文章
5
资源
0
加入时间
3年1月13天

libevent定时器使用

一、定时器处理如下struct timeval s_send_timeout_tv = {2, 0};struct event *s_send_timeout_event;static void read_terminal_cb(int fd, short what, void*arg){ uint i = 0; char buf[1024] = {0}; int len = read(fd, buf, sizeof(buf)); printf("\r\...