L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN struct lws\+\_\+spa $\ast$\hyperlink{group__form-parsing_ga162f86762173a2bc8c28497941d74815}{lws\+\_\+spa\+\_\+create} (struct lws $\ast$wsi, const char $\ast$const $\ast$param\+\_\+names, int count\+\_\+params, int max\+\_\+storage, \hyperlink{group__form-parsing_ga5a70527c0861c2ffa3d29333a6aa7f8e}{lws\+\_\+spa\+\_\+fileupload\+\_\+cb} opt\+\_\+cb, void $\ast$opt\+\_\+data)
\item
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int \hyperlink{group__form-parsing_ga9ad9ebf5ea1a7108415ed7e04cb231d2}{lws\+\_\+spa\+\_\+process} (struct lws\+\_\+spa $\ast$spa, const char $\ast$in, int len)
\item
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int \hyperlink{group__form-parsing_ga83835bf250ee3d4a60f36a182f2b8d24}{lws\+\_\+spa\+\_\+finalize} (struct lws\+\_\+spa $\ast$spa)
\item
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int \hyperlink{group__form-parsing_ga3fbe378632f85ec9a14cc2c1687bf05f}{lws\+\_\+spa\+\_\+get\+\_\+length} (struct lws\+\_\+spa $\ast$spa, int n)
\item
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN const char $\ast$\hyperlink{group__form-parsing_ga2da476217166da02704b90d3a8d4f3cd}{lws\+\_\+spa\+\_\+get\+\_\+string} (struct lws\+\_\+spa $\ast$spa, int n)
\item
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int \hyperlink{group__form-parsing_gaaa482f07dad3f04b391cccf0a814e13b}{lws\+\_\+spa\+\_\+destroy} (struct lws\+\_\+spa $\ast$spa)
\end{DoxyCompactItemize}
\subsection{Detailed Description}
\subsubsection*{P\+O\+S\+Ted form parsing functions}
These lws\+\_\+spa (stateful post arguments) apis let you parse and urldecode P\+O\+S\+Ted form arguments, both using simple urlencoded and multipart transfer encoding.
It\textquotesingle{}s capable of handling file uploads as well a named input parsing, and the apis are the same for both form upload styles.
You feed it a list of parameter names and it creates pointers to the urldecoded arguments\+: file upload parameters pass the file data in chunks to a user-\/supplied callback as they come.
Since it\textquotesingle{}s stateful, it handles the incoming data needing more than one P\+O\+S\+T\+\_\+\+B\+O\+DY callback and has no limit on uploaded file size.
\subsubsection[{\texorpdfstring{lws\+\_\+spa\+\_\+fileupload\+\_\+states}{lws\_spa\_fileupload\_states}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf lws\+\_\+spa\+\_\+fileupload\+\_\+states}}\hypertarget{group__form-parsing_ga41a74a822771d3dce89751aa3bce28ae}{}\label{group__form-parsing_ga41a74a822771d3dce89751aa3bce28ae}
}]the last chunk (possibly zero length) of file content has arrived \index{L\+W\+S\+\_\+\+U\+F\+S\+\_\+\+O\+P\+EN@{L\+W\+S\+\_\+\+U\+F\+S\+\_\+\+O\+P\+EN}!Form Parsing@{Form Parsing}}\index{Form Parsing@{Form Parsing}!L\+W\+S\+\_\+\+U\+F\+S\+\_\+\+O\+P\+EN@{L\+W\+S\+\_\+\+U\+F\+S\+\_\+\+O\+P\+EN}}\item[{\em
{\em wsi}& lws connection (used to find Content Type) \\
\hline
{\em param\+\_\+names}& array of form parameter names, like \char`\"{}username\char`\"{}\\
\hline
{\em count\+\_\+params}& count of param\+\_\+names \\
\hline
{\em max\+\_\+storage}& total amount of form parameter values we can store \\
\hline
{\em opt\+\_\+cb}& N\+U\+LL, or callback to receive file upload data. \\
\hline
{\em opt\+\_\+data}& N\+U\+LL, or user pointer provided to opt\+\_\+cb.\\
\hline
\end{DoxyParams}
Creates a urldecode parser and initializes it.
opt\+\_\+cb can be N\+U\+LL if you just want normal name=value parsing, however if one or more entries in your form are bulk data (file transfer), you can provide this callback and filter on the name callback parameter to treat that urldecoded data separately. The callback should return -\/1 in case of fatal error, and 0 if OK. \index{Form Parsing@{Form Parsing}!lws\+\_\+spa\+\_\+destroy@{lws\+\_\+spa\+\_\+destroy}}
\subsubsection[{\texorpdfstring{lws\+\_\+spa\+\_\+get\+\_\+length(struct lws\+\_\+spa $\ast$spa, int n)}{lws\_spa\_get\_length(struct lws\_spa *spa, int n)}}]{\setlength{\rightskip}{0pt plus 5cm}L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int lws\+\_\+spa\+\_\+get\+\_\+length (