• 2024-08-02使用epoll编写TCP服务器示例
    #include<stdio.h>#include<stdlib.h>#include<string.h>#include<errno.h>#include<netinet/in.h>#include<sys/socket.h>#include<arpa/inet.h>#include<sys/epoll.h>#include<unistd.h>#include
  • 2024-07-18【Linux网络编程-7】epoll边沿触发
    非阻塞recvEAGAIN、EWOULDBLOCK错误码值11返回值含义>0接收字节数0接收FIN包,连接被对端断开-1(errno==EAGAIN||EWOULDBLOCK)表示还有数据未读。反之,则表示发生了错误。//epollServer.cpp#include<stdio.h>#include<stdlib.h>#include<string.h>#in