![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络编程
Unicorn cc
stay hungry ,stay foolish
展开
-
make:file not recognized: file format not recognized
学艺不精,在Makefile规则中包含了头文件,导致make编译时出现标题错误去掉Makefile中的.h文件即可,特此记录下原创 2021-04-17 15:40:40 · 593 阅读 · 0 评论 -
非阻塞connect实现代码
非阻塞connect实现代码使用非阻塞IO连接服务端,可将sleep替换要执行的任务,客户主循环利用epoll监听事标准输入和socket上的事件,利用管道将标准输入写入socket```cpp#include <sys/types.h>#include <unistd.h>#include <arpa/inet.h>#include <netinet/in.h>#include <errno.h>#include <sys原创 2021-04-02 11:51:12 · 118 阅读 · 0 评论