91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 332KB
    文件類型: .rar
    金幣: 1
    下載: 0 次
    發布日期: 2021-06-15
  • 語言: C/C++
  • 標簽: C++??http??

資源簡介

輕量級C++實現的httpserver和httpclient,給予mongoose,代碼量很小,可以方便嵌入到自己的項目中,為C++項目添加http的功能,拋棄libcurl這種重型庫

資源截圖

代碼片段和文件信息

#include?“mongoose.h“
#ifdef?MG_MODULE_LINES
#line?1?“mongoose/src/internal.h“
#endif
/*
?*?Copyright?(c)?2014?Cesanta?Software?Limited
?*?All?rights?reserved
?*/

#ifndef?CS_MONGOOSE_SRC_INTERNAL_H_
#define?CS_MONGOOSE_SRC_INTERNAL_H_

#ifndef?MG_MALLOC
#define?MG_MALLOC?malloc
#endif

#ifndef?MG_CALLOC
#define?MG_CALLOC?calloc
#endif

#ifndef?MG_REALLOC
#define?MG_REALLOC?realloc
#endif

#ifndef?MG_FREE
#define?MG_FREE?free
#endif

#ifndef?MBUF_REALLOC
#define?MBUF_REALLOC?MG_REALLOC
#endif

#ifndef?MBUF_FREE
#define?MBUF_FREE?MG_FREE
#endif

#define?MG_SET_PTRPTR(_ptr?_v)?\
??do?{??????????????????????????\
????if?(_ptr)?*(_ptr)?=?_v;?????\
??}?while?(0)

#ifndef?MG_INTERNAL
#define?MG_INTERNAL?static
#endif

#ifdef?PICOTCP
#define?NO_LIBC
#define?MG_DISABLE_PFS
#endif

/*?Amalgamated:?#include?“mongoose/src/net.h“?*/
/*?Amalgamated:?#include?“mongoose/src/http.h“?*/
/*?Amalgamated:?#include?“common/cs_dbg.h“?*/

#define?MG_CTL_MSG_MESSAGE_SIZE?8192

/*?internals?that?need?to?be?accessible?in?unit?tests?*/
MG_INTERNAL?struct?mg_connection?*mg_do_connect(struct?mg_connection?*nc
????????????????????????????????????????????????int?proto
????????????????????????????????????????????????union?socket_address?*sa);

MG_INTERNAL?int?mg_parse_address(const?char?*str?union?socket_address?*sa
?????????????????????????????????int?*proto?char?*host?size_t?host_len);
MG_INTERNAL?void?mg_call(struct?mg_connection?*nc
?????????????????????????mg_event_handler_t?ev_handler?int?ev?void?*ev_data);
void?mg_forward(struct?mg_connection?*from?struct?mg_connection?*to);
MG_INTERNAL?void?mg_add_conn(struct?mg_mgr?*mgr?struct?mg_connection?*c);
MG_INTERNAL?void?mg_remove_conn(struct?mg_connection?*c);
MG_INTERNAL?struct?mg_connection?*mg_create_connection(
????struct?mg_mgr?*mgr?mg_event_handler_t?callback
????struct?mg_add_sock_opts?opts);
#ifdef?_WIN32
/*?Retur?value?is?the?same?as?for?MultiByteToWideChar.?*/
int?to_wchar(const?char?*path?wchar_t?*wbuf?size_t?wbuf_len);
#endif

struct?ctl_msg?{
??mg_event_handler_t?callback;
??char?message[MG_CTL_MSG_MESSAGE_SIZE];
};

#if?MG_ENABLE_MQTT
struct?mg_mqtt_message;
MG_INTERNAL?int?parse_mqtt(struct?mbuf?*io?struct?mg_mqtt_message?*mm);
#endif

/*?Forward?declarations?for?testing.?*/
extern?void?*(*test_malloc)(size_t?size);
extern?void?*(*test_calloc)(size_t?count?size_t?size);

#ifndef?MIN
#define?MIN(a?b)?((a)?#endif

#if?MG_ENABLE_HTTP
struct?mg_serve_http_opts;

/*
?*?Reassemble?the?content?of?the?buffer?(buf?blen)?which?should?be
?*?in?the?HTTP?chunked?encoding?by?collapsing?data?chunks?to?the
?*?beginning?of?the?buffer.
?*
?*?If?chunks?get?reassembled?modify?hm->body?to?point?to?the?reassembled
?*?body?and?fire?MG_EV_HTTP_CHUNK?event.?If?handler?sets?MG_F_DELETE_CHUNK
?*?in?nc->flags?delete?reassembled?body?from?the?mbuf.
?*
?*?Return?reassembled?body?size.
?*/
MG_INTERNAL?size_t?mg_handle_chunked(struct?mg_connection?*nc
?????????????????????????????????????struct?http_m

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????????4??2018-03-17?21:22??CppHttpDemo\.git\COMMIT_EDITMSG

?????文件????????130??2018-03-17?21:20??CppHttpDemo\.git\config

?????文件?????????73??2018-03-17?21:20??CppHttpDemo\.git\description

?????文件?????????23??2018-03-17?21:20??CppHttpDemo\.git\HEAD

?????文件????????177??2018-03-17?21:20??CppHttpDemo\.git\hooks\README.sample

?????文件????????984??2018-03-17?21:22??CppHttpDemo\.git\index

?????文件????????113??2018-03-17?21:20??CppHttpDemo\.git\info\exclude

?????文件????????346??2018-03-17?21:22??CppHttpDemo\.git\logs\HEAD

?????文件????????346??2018-03-17?21:22??CppHttpDemo\.git\logs\refs\heads\master

?????文件????????330??2018-03-17?21:22??CppHttpDemo\.git\objects\03\70998e58e331985defe648e64bad2aa32062e6

?????文件????????188??2018-03-17?21:22??CppHttpDemo\.git\objects\07\a197325414ba7d2504f2bdfac5c6cbca518990

?????文件?????????89??2018-03-17?21:20??CppHttpDemo\.git\objects\19\ce9d8ff1fccf510df82d99a65f48c649b7becd

?????文件??????50130??2018-03-17?21:22??CppHttpDemo\.git\objects\1a\0bd0cd3d3f848b5f497c97d471f6673cfa5f5e

?????文件????????643??2018-03-17?21:22??CppHttpDemo\.git\objects\1a\5c54c990c0671e5deec6c2686ee12f8a92bdce

?????文件?????138007??2018-03-17?21:22??CppHttpDemo\.git\objects\3a\7ed941a585eeb486a4450af855104f4be06d4d

?????文件????????296??2018-03-17?21:22??CppHttpDemo\.git\objects\4f\c9da4dd6d33cc6a95040b3fbb0c124488b340f

?????文件?????????79??2018-03-17?21:22??CppHttpDemo\.git\objects\50\b4b0d4f0ad6ff5b90c711af3b670925cc149ae

?????文件?????????55??2018-03-17?21:22??CppHttpDemo\.git\objects\51\e51bb2a16649f5cf20a84d27651f5b7871f24a

?????文件???????1531??2018-03-17?21:22??CppHttpDemo\.git\objects\62\31530bfd3b2d464d2f45995e7380fa639b11e3

?????文件????????600??2018-03-17?21:22??CppHttpDemo\.git\objects\84\99ad47e25980bdd9f94d4952cf10048d6cbc46

?????文件????????344??2018-03-17?21:20??CppHttpDemo\.git\objects\96\374c4e7f13264096db3a2c31c27963ee5a6f2d

?????文件????????162??2018-03-17?21:22??CppHttpDemo\.git\objects\ad\81650006b6de8b7811e8d2c7513fefe4d119f0

?????文件????????167??2018-03-17?21:20??CppHttpDemo\.git\objects\b7\3513459f6b3990ccd3bf92e0afdb432302eae6

?????文件????????462??2018-03-17?21:22??CppHttpDemo\.git\objects\b7\5e74294758cb89e7a27d4f30bc49c6246188fe

?????文件????????188??2018-03-17?21:20??CppHttpDemo\.git\objects\bd\b0cabc87cf50106df6e15097dff816c8c3eb34

?????文件????????144??2018-03-17?21:22??CppHttpDemo\.git\objects\c4\7ffccc18ec91bf59d0f12f7b3b58abaf75d794

?????文件????????803??2018-03-17?21:22??CppHttpDemo\.git\objects\c9\4dac8bd2366ae1df6e591f820bca86ceb860a4

?????文件????????116??2018-03-17?21:22??CppHttpDemo\.git\objects\e0\2217f22febb2a719ad4d8055a671dd227b2dcd

?????文件?????????41??2018-03-17?21:22??CppHttpDemo\.git\refs\heads\master

?????文件????????395??2014-12-19?12:57??CppHttpDemo\.gitattributes

............此處省略47個文件信息

評論

共有 條評論