mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-02 03:27:52 +08:00
f443c64341
Until I read the doc and find how to limit the retention, otherwise it just eats all my ram and cpu and things start to fall apart. PUBLISHED_FROM=eb33fb44736f07b992270689217aca4af70513ff
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
==== mg_do_connect()
|
|
|
|
[source,c]
|
|
----
|
|
MG_INTERNAL struct mg_connection *mg_do_connect(struct mg_connection *nc,
|
|
int proto,
|
|
union socket_address *sa);
|
|
----
|
|
internals that need to be accessible in unit tests
|
|
|
|
==== to_wchar()
|
|
|
|
[source,c]
|
|
----
|
|
int to_wchar(const char *path, wchar_t *wbuf, size_t wbuf_len);
|
|
----
|
|
Retur value is the same as for MultiByteToWideChar.
|
|
|
|
==== mg_handle_chunked()
|
|
|
|
[source,c]
|
|
----
|
|
MG_INTERNAL size_t mg_handle_chunked(struct mg_connection *nc,
|
|
struct http_message *hm, char *buf,
|
|
size_t blen);
|
|
----
|
|
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.
|
|
|