mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-29 12:41:03 +00:00
Added mg_send_file()
This commit is contained in:
1 parent
23a3cc6472
commit
5bbb6fbbd5
2 files changed
+15
No files matched your search
@@ -158,6 +158,11 @@ int mg_write(struct mg_connection *, const void *buf, size_t len);
|
||||
int mg_printf(struct mg_connection *, const char *fmt, ...);
|
||||
|
||||
|
||||
// Send contents of the entire file together with HTTP headers.
|
||||
// Return 1 on success, 0 on error (e.g. file does not exist).
|
||||
void mg_send_file(struct mg_connection *conn, const char *path);
|
||||
|
||||
|
||||
// Read data from the remote end, return number of bytes read.
|
||||
int mg_read(struct mg_connection *, void *buf, size_t len);
|
||||
|
||||
|
||||
Reference in new issue
Block a user