随笔分类 -  tcp/ip

摘要:https://blog.csdn.net/jyy305/article/details/73012706 select的优缺点 优点: (1)select的可移植性好,在某些unix下不支持poll. (2)select对超时值提供了很好的精度,精确到微秒,而poll式毫秒。 缺点: (1)单个进 阅读全文
posted @ 2021-10-07 22:46 feiwatson 阅读(166) 评论(0) 推荐(0)
摘要:Muduo is a multithreaded C++ network library based on the reactor pattern. https://github.com/chenshuo/muduo https://github.com/chenshuo/muduo-tutoria 阅读全文
posted @ 2021-10-05 13:49 feiwatson 阅读(53) 评论(0) 推荐(0)
摘要:执行流程: 1、创建监听 socket,并绑定、监听; 2、调用 epoll_create() , 创建 epollfd 代理; 3、将想要监听的 listenfd,通过 epoll_ctl() , 挂载到 epollfd 上,让 epollfd 代理监听; 4、在一个 while 循环中,调用 e 阅读全文
posted @ 2021-10-05 13:42 feiwatson 阅读(120) 评论(0) 推荐(0)