分享

web信息的搜集--CommonDef.h

 闲来看看 2013-01-18

web信息的搜集--CommonDef.h

CommonDef.h

#ifndef COMMONDEF_H_

#define COMMONDEF_H_

const int PORT_NUMBER=80;

#define HTTP_VERSION"HTTP/1.0"

#define DEFAULT_USER_AGENT"Tse"

#define VERSION"1.0"

const int DEFAULT_TIMEOUT = 30;//Seconds to wait before giving up when no data is arriving

const int REQUEST_BUF_SIZE = 1024;

const int HEADER_BUF_SIZE = 1024;

const int DEFAULT_PAGE_BUF_SIZE = 1024 * 200; //200K should hold most things

const int MAX_PAGE_BUF_SIZE = 5 * 1024 * 1024;// 5MB is up limit

extern map<string,string> mapCacheHostLookup;

extern map<unsigned long,unsigned long> mapIpBlock;

typedef map<unsigned long,unsigned long>::value_type valTypeIpBlock;

#endif /* COMMONDEF_H_ */

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多