MCPcopy Create free account
hub / github.com/acl-dev/acl / hdr_get

Function hdr_get

lib_protocol/src/http/http_chat_sync.c:88–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86/* ͬ����ȡһ��������HTTPЭ��ͷ */
87
88static int hdr_get(HTTP_HDR *hdr, ACL_VSTREAM *stream, int timeout)
89{
90/* ��ʹ��Э�̹���ջʱ���������BUFF��Ĺ��󣬻�������ջ�Ŀռ��С������ڴ��˷� */
91 char buf[HTTP_BUF_SIZE];
92 int ret;
93
94 stream->rw_timeout = timeout;
95
96 while (1) {
97 ret = acl_vstream_gets_nonl(stream, buf, sizeof(buf) - 1);
98 if (ret == ACL_VSTREAM_EOF) {
99 return HTTP_CHAT_ERR_IO;
100 }
101
102 ret = hdr_ready(hdr, buf, ret);
103 if (ret != HTTP_CHAT_CONTINUE) {
104 break;
105 }
106 }
107
108 /* ret: HTTP_CHAT_OK or error */
109 return ret;
110}
111
112int http_hdr_req_get_sync(HTTP_HDR_REQ *hdr_req, ACL_VSTREAM *stream, int timeout)
113{

Callers 2

http_hdr_req_get_syncFunction · 0.85
http_hdr_res_get_syncFunction · 0.85

Calls 2

acl_vstream_gets_nonlFunction · 0.85
hdr_readyFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…