两种机制的原理不赘述了,代码中有详细注释。
2.1 升序链表法完整代码参见:https://github.com/GaoZiqiang/Cplus_daily_training/tree/master/unix_program/signal/keepalive
2.2 时间轮法完整代码参见:https://github.com/GaoZiqiang/Cplus_daily_training/tree/master/unix_program/signal/time_wheel_timer
3 参考材料- 游双《Linux高性能服务器编程》



