How to code an epoll based sockets client in C
问题 All the examples I can find online are servers. I want to build a basic web crawler using epoll. So I need a basic client example to get me started. When I say basic I really mean a complete example that demonstrates multiple connections with sending and receiving of data to live web hosts. A simple HEAD request and its response for example. 回答1: Here is a sample c code for client socket with epoll. #include <stdlib.h> #include <stdio.h> #include <string.h> #include <errno.h> #include <sys