![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Cpp源码
heibao111728
一定要拥有一家自己的公司
展开
-
linux下多线程编程
#include <stdio.h>#include <unistd.h>#include <pthread.h>#include <iostream>using namespace std;void* threadFun(void* p){ char buf[ 9 * 1024 * 1024] = {0}; prin...原创 2018-06-26 14:35:56 · 146 阅读 · 0 评论 -
linux平台下epoll使用源码样例
在linux下我们都知道可以使用select模型实现异步通信,但是使用select有限制,最多只能管理1024个端口,而epoll可以管理65535个端口,同时epoll比select效率更高,缺点是select支持跨平台windows下也可以使用而epoll是linux专属,windows下有类似于epoll的解决方案即IOCP(I/O Completion Port),常称I/O完成端口。下面...原创 2018-07-10 13:17:22 · 967 阅读 · 3 评论