This is a dependency of our upcoming web-based material debugger. This
CL also includes `tnt/CMakeLists.txt`, which builds a static lib in a
minimal configuration that enables WebSocket support. The entire library
is built from only 4 files:
${PUBLIC_HDR_DIR}/CivetServer.h
${PUBLIC_HDR_DIR}/civetweb.h
${SRC_DIR}/civetweb.c
${SRC_DIR}/CivetServer.cpp
1.0 KiB
1.0 KiB
Civetweb API Reference
mg_send_mime_file( conn, path, mime_type );
Parameters
| Parameter | Type | Description |
|---|---|---|
conn |
struct mg_connection * |
The connection over which the file must be sent |
path |
const char * |
The full path and filename of the file |
mime_type |
const char * |
The mime type of the file, or NULL for automatic detection |
Return Value
none
Description
The function mg_send_mime_file() sends a file over a connection including the HTTP headers. The function is similar to the mg_send_file() with the additional functionality that the MIME type of the file can be specified. If the mime_type parameter is NULL, the routine will try to determine the MIME type based on the extension of the filename.