資源簡介
http_load修改版,只支持post請求,且按順序執行,參考https://blog.csdn.net/lala9517/article/details/79870755

代碼片段和文件信息
/*?http_load?-?multiprocessing?http?test?client
**
**?Copyright??1998199920012016?by?Jef?Poskanzer?.
**?All?rights?reserved.
**
**?Redistribution?and?use?in?source?and?binary?forms?with?or?without
**?modification?are?permitted?provided?that?the?following?conditions
**?are?met:
**?1.?Redistributions?of?source?code?must?retain?the?above?copyright
**????notice?this?list?of?conditions?and?the?following?disclaimer.
**?2.?Redistributions?in?binary?form?must?reproduce?the?above?copyright
**????notice?this?list?of?conditions?and?the?following?disclaimer?in?the
**????documentation?and/or?other?materials?provided?with?the?distribution.
**?
**?THIS?SOFTWARE?IS?PROVIDED?BY?THE?AUTHOR?AND?CONTRIBUTORS?‘‘AS?IS‘‘?AND
**?ANY?EXPRESS?OR?IMPLIED?WARRANTIES?INCLUDING?BUT?NOT?LIMITED?TO?THE
**?IMPLIED?WARRANTIES?OF?MERCHANTABILITY?AND?FITNESS?FOR?A?PARTICULAR?PURPOSE
**?ARE?DISCLAIMED.??IN?NO?EVENT?SHALL?THE?AUTHOR?OR?CONTRIBUTORS?BE?LIABLE
**?FOR?ANY?DIRECT?INDIRECT?INCIDENTAL?SPECIAL?EXEMPLARY?OR?CONSEQUENTIAL
**?DAMAGES?(INCLUDING?BUT?NOT?LIMITED?TO?PROCUREMENT?OF?SUBSTITUTE?GOODS
**?OR?SERVICES;?LOSS?OF?USE?DATA?OR?PROFITS;?OR?BUSINESS?INTERRUPTION)
**?HOWEVER?CAUSED?AND?ON?ANY?THEORY?OF?LIABILITY?WHETHER?IN?CONTRACT?STRICT
**?LIABILITY?OR?TORT?(INCLUDING?NEGLIGENCE?OR?OTHERWISE)?ARISING?IN?ANY?WAY
**?OUT?OF?THE?USE?OF?THIS?SOFTWARE?EVEN?IF?ADVISED?OF?THE?POSSIBILITY?OF
**?SUCH?DAMAGE.
*/
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#include?
#ifdef?USE_SSL
#include?
#include?
#include?
#endif
#include?“version.h“
#include?“port.h“
#include?“timers.h“
#if?defined(AF_INET6)?&&?defined(IN6_IS_ADDR_V4MAPPED)
#define?USE_IPV6
#endif
#define?max(ab)?((a)>=(b)?(a):(b))
#define?min(ab)?((a)<=(b)?(a):(b))
/*?How?long?a?connection?can?stay?idle?before?we?give?up?on?it.?*/
#define?IDLE_SECS?60
/*?Default?max?bytes/second?in?throttle?mode.?*/
#define?THROTTLE?3360
/*?How?often?to?show?progress?reports.?*/
#define?PROGRESS_SECS?60
/*?How?many?file?descriptors?to?not?use.?*/
#define?RESERVED_FDS?3
typedef?struct?{
????char*?url_str;
????int?protocol;
????char*?hostname;
????unsigned?short?port;
#ifdef?USE_IPV6
????struct?sockaddr_in6?sa_in;
#else?/*?USE_IPV6?*/
????struct?sockaddr_in?sa_in;
#endif?/*?USE_IPV6?*/
????int?sa_len?sock_family?sock_type?sock_protocol;
????char*?filename;
char*?filedata;
????int?got_bytes;
????long?bytes;
????int?got_checksum;
????long?checksum;
????}?url;
static?url*?urls;
static?int?num_urls?max_urls?num_run_urls;
typedef?struct?{
????char*?str;
????struct?sockaddr_in?sa_in;
????}?sip;
static?sip*?sips;
static?int?num_sips?max_sips;
/*?Protocol?symbols.?*/
#define?PROTO_HTTP?0
#ifd
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-04-09?18:41??http_load_post\
?????文件????????6148??2018-04-09?18:41??http_load_post\.DS_Store
?????目錄???????????0??2018-04-09?18:41??__MACOSX\
?????目錄???????????0??2018-04-09?18:41??__MACOSX\http_load_post\
?????文件?????????120??2018-04-09?18:41??__MACOSX\http_load_post\._.DS_Store
?????文件??????????97??2018-04-04?11:15??http_load_post\FILES
?????文件???????24760??2018-04-09?18:30??http_load_post\http_load
?????文件????????5414??2018-04-04?11:15??http_load_post\http_load.1
?????文件???????48886??2018-04-09?18:30??http_load_post\http_load.c
?????文件????????1178??2018-04-04?11:15??http_load_post\make_test_files
?????文件????????1682??2018-04-04?11:15??http_load_post\Makefile
?????文件????????2504??2018-04-04?11:15??http_load_post\port.h
?????文件????????1035??2018-04-04?11:15??http_load_post\README
?????文件????????7362??2018-04-04?11:15??http_load_post\timers.c
?????文件????????3832??2018-04-04?11:15??http_load_post\timers.h
?????文件????????4760??2018-04-04?11:15??http_load_post\timers.o
?????文件?????????163??2018-04-04?11:15??http_load_post\version.h
- 上一篇:計算方法實驗答案哈工大
- 下一篇:Hopfield人工神經網絡求解TSP問題附論文
評論
共有 條評論