\hyperlink{group__httpft_gab4da87a4800413f15e7aba649fb1d77c}{lws\+\_\+get\+\_\+mimetype()} -\/ Determine mimetype to use from filename
\begin{DoxyParams}{Parameters}
{\em file}& filename \\
\hline
{\em m}& N\+U\+LL, or mount context\\
\hline
\end{DoxyParams}
This uses a canned list of known filetypes first, if no match and m is non-\/\+N\+U\+LL, then tries a list of per-\/mount file suffix to mimtype mappings.
Returns either N\+U\+LL or a pointer to the mimetype matching the file. \index{H\+T\+T\+P File transfer@{H\+T\+T\+P File transfer}!lws\+\_\+serve\+\_\+http\+\_\+file@{lws\+\_\+serve\+\_\+http\+\_\+file}}
\hyperlink{group__httpft_gab393a06d3d2722af4c3f8b06842c80d7}{lws\+\_\+serve\+\_\+http\+\_\+file()} -\/ Send a file back to the client using http
\begin{DoxyParams}{Parameters}
{\em wsi}& Websocket instance (available from user callback) \\
\hline
{\em file}& The file to issue over http \\
\hline
{\em content\+\_\+type}& The http content type, eg, text/html \\
\hline
{\em other\+\_\+headers}& N\+U\+LL or pointer to header string \\
\hline
{\em other\+\_\+headers\+\_\+len}& length of the other headers if non-\/\+N\+U\+LL \begin{DoxyVerb} This function is intended to be called from the callback in response
to http requests from the client. It allows the callback to issue
local files down the http link in a single step.
Returning <0 indicates error and the wsi should be closed. Returning
>0 indicates the file was completely sent and
lws_http_transaction_completed() called on the wsi (and close if != 0)
==0 indicates the file transfer is started and needs more service later,