mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 17:30:53 +08:00
cf2528eb7c
完善了非阻塞IO的SSL功能;将 acl/samples/ 下的示例分别移到 lib_acl 及 lib_protocol 目录下
38 lines
926 B
C
38 lines
926 B
C
#ifndef __HTTP_SERVICE_INCLUDE_H__
|
||
#define __HTTP_SERVICE_INCLUDE_H__
|
||
|
||
#include "lib_acl.h"
|
||
#include "lib_protocol.h"
|
||
#include "dict_pool.h"
|
||
|
||
#if 0
|
||
#define TRACE() acl_msg_info(">>>%s: %d", __FUNCTION__, __LINE__)
|
||
#else
|
||
#define TRACE()
|
||
#endif
|
||
|
||
typedef struct HTTP_CLIENT {
|
||
ACL_ASTREAM *stream;
|
||
HTTP_HDR_REQ *hdr_req; /* HTTPÐÒéÇëÇóÍ·Ö¸Õë */
|
||
HTTP_REQ *http_req;
|
||
ACL_VSTRING *sbuf;
|
||
ACL_VSTRING *key;
|
||
DICT_POOL *dict_pool;
|
||
} HTTP_CLIENT;
|
||
|
||
/* http_client.c */
|
||
|
||
HTTP_CLIENT *http_client_new(ACL_ASTREAM *stream);
|
||
void http_client_free(HTTP_CLIENT *client);
|
||
void http_client_reset(HTTP_CLIENT *client);
|
||
|
||
/* http_service.c */
|
||
void http_service_init(void *init_ctx);
|
||
void http_service_exit(void *exit_ctx);
|
||
void http_service_main(ACL_ASTREAM *stream, void *ctx);
|
||
|
||
/* in http_error.c */
|
||
void http_error_reply(HTTP_CLIENT *http_client, int status, const char *msg);
|
||
|
||
#endif
|