Epoll a large number of proxy address validators completed

Source: Internet
Author: User
Tags epoll
Epoll A large number of proxy address validators completed#include < stdio.h >

#include < stdint.h >

#include < unistd.h >

#include < fcntl.h >

#include < string. h >

#include < strings.h >

#include < sys/types.h >

#include < sys/socket.h >

#include < arpa/inet.h >

#include < stdlib.h >

#include < errno.h >

#include < sys/epoll.h >



#define MAXSOCKFDNUM 100

#define TIMEOUT (20 * 1000)

#define HTTP_REQ "get/us/http/1.1 host:www.ibm.com:80 user-agent:wget accept:text/xml,text/html;*/*"



struct Epoll_datas

... {

struct SOCKADDR servaddr;

int sockfd;

} ;

struct Epoll_datas datas[maxsockfdnum];



int main (int argc, char * argv[])

... {

struct sockaddr_in *st_in;

int Sockfds[maxsockfdnum], flags;


Char buffer[1000];

int Recvlen;

int dstport, n, Flags;



int error = 0, I;

Socklen_t Len;

int epoll_handle;

struct epoll_event ev;

struct Epoll_event events[maxsockfdnum * 2];

char *ptr = NULL;

int ret;

Char ip_str_ret[20];

FILE *FP;

int ipnum;

int num = 0;



memset (events, 0,
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.