mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-23 00:00:06 +01:00

This clears up a couple of issues with client connect. - if CLIENT_CONNECTION_ERROR is coming, which of the many ways the rejection may have happened is documented in the in argument. It's still possible if it just got hung up on in will be NULL, but now it has MANY more canned strings describing the issue available at the callback "getaddrinfo (ipv6) failed" "unknown address family" "getaddrinfo (ipv4) failed" "set socket opts failed" "insert wsi failed" "lws_ssl_client_connect1 failed" "lws_ssl_client_connect2 failed" "Peer hung up" "read failed" "HS: URI missing" "HS: Redirect code but no Location" "HS: URI did not parse" "HS: Redirect failed" "HS: Server did not return 200" "HS: OOM" "HS: disallowed by client filter" "HS: disallowed at ESTABLISHED" "HS: ACCEPT missing" "HS: ws upgrade response not 101" "HS: UPGRADE missing" "HS: Upgrade to something other than websocket" "HS: CONNECTION missing" "HS: UPGRADE malformed" "HS: PROTOCOL malformed" "HS: Cannot match protocol" "HS: EXT: list too big" "HS: EXT: failed setting defaults" "HS: EXT: failed parsing defaults" "HS: EXT: failed parsing options" "HS: EXT: Rejects server options" "HS: EXT: unknown ext" "HS: Accept hash wrong" "HS: Rejected by filter cb" "HS: OOM" "HS: SO_SNDBUF failed" "HS: Rejected at CLIENT_ESTABLISHED" - until now the user code did not get the new wsi that was created in the client connection action until it returned. However the client connection action may provoke callbacks like CLIENT_CONNECTION_ERROR before then, if multiple client connections are initiated it makes it unknown to user code which one the callback applies to. The wsi is provided in the callback but it has not yet returned from the client connect api to give that wsi to the user code. To solve that there is a new member added to client connect info struct, pwsi, which lets you pass a pointer to a struct wsi * in the user code that will get filled in with the new wsi. That happens before any callbacks could be provoked, and it is updated to NULL if the connect action fails before returning from the client connect api.
166 lines
No EOL
14 KiB
TeX
166 lines
No EOL
14 KiB
TeX
\hypertarget{group__smtp}{}\section{Smtp}
|
|
\label{group__smtp}\index{Smtp@{Smtp}}
|
|
\subsection*{Data Structures}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
struct \hyperlink{structlws__email}{lws\+\_\+email}
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Enumerations}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
enum \hyperlink{group__smtp_ga116be79bf44f9dc2a97f46e051fe4dc0}{lwsgs\+\_\+smtp\+\_\+states} \{ \\*
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c}{L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933}{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d}{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO},
|
|
\\*
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA},
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY},
|
|
\\*
|
|
\hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5}{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT}
|
|
\}
|
|
\end{DoxyCompactItemize}
|
|
\subsection*{Functions}
|
|
\begin{DoxyCompactItemize}
|
|
\item
|
|
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int \hyperlink{group__smtp_ga77fc9b56a1bb39484844981ec375fc29}{lws\+\_\+email\+\_\+init} (struct \hyperlink{structlws__email}{lws\+\_\+email} $\ast$email, uv\+\_\+loop\+\_\+t $\ast$loop, int max\+\_\+content)
|
|
\item
|
|
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN void \hyperlink{group__smtp_ga5e535e346d92a9daf00be33abf79d4eb}{lws\+\_\+email\+\_\+check} (struct \hyperlink{structlws__email}{lws\+\_\+email} $\ast$email)
|
|
\item
|
|
L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN void \hyperlink{group__smtp_ga25298a5afc1074e13b2d5711a86432b2}{lws\+\_\+email\+\_\+destroy} (struct \hyperlink{structlws__email}{lws\+\_\+email} $\ast$email)
|
|
\end{DoxyCompactItemize}
|
|
|
|
|
|
\subsection{Detailed Description}
|
|
\subsubsection*{S\+M\+TP related functions}
|
|
|
|
These apis let you communicate with a local S\+M\+TP server to send email from lws. It handles all the S\+M\+TP sequencing and protocol actions.
|
|
|
|
Your system should have postfix, sendmail or another M\+TA listening on port 25 and able to send email using the \char`\"{}mail\char`\"{} commandline app. Usually distro M\+T\+As are configured for this by default.
|
|
|
|
It runs via its own libuv events if initialized (which requires giving it a libuv loop to attach to).
|
|
|
|
It operates using three callbacks, on\+\_\+next() queries if there is a new email to send, on\+\_\+get\+\_\+body() asks for the body of the email, and on\+\_\+sent() is called after the email is successfully sent.
|
|
|
|
To use it
|
|
|
|
|
|
\begin{DoxyItemize}
|
|
\item create an \hyperlink{structlws__email}{lws\+\_\+email} struct
|
|
\item initialize data, loop, the email\+\_\+$\ast$ strings, max\+\_\+content\+\_\+size and the callbacks
|
|
\item call \hyperlink{group__smtp_ga77fc9b56a1bb39484844981ec375fc29}{lws\+\_\+email\+\_\+init()}
|
|
\end{DoxyItemize}
|
|
|
|
When you have at least one email to send, call \hyperlink{group__smtp_ga5e535e346d92a9daf00be33abf79d4eb}{lws\+\_\+email\+\_\+check()} to schedule starting to send it.
|
|
|
|
\subsection{Enumeration Type Documentation}
|
|
\index{Smtp@{Smtp}!lwsgs\+\_\+smtp\+\_\+states@{lwsgs\+\_\+smtp\+\_\+states}}
|
|
\index{lwsgs\+\_\+smtp\+\_\+states@{lwsgs\+\_\+smtp\+\_\+states}!Smtp@{Smtp}}
|
|
\subsubsection[{\texorpdfstring{lwsgs\+\_\+smtp\+\_\+states}{lwsgs\_smtp\_states}}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf lwsgs\+\_\+smtp\+\_\+states}}\hypertarget{group__smtp_ga116be79bf44f9dc2a97f46e051fe4dc0}{}\label{group__smtp_ga116be79bf44f9dc2a97f46e051fe4dc0}
|
|
|
|
|
|
{\ttfamily \#include $<$\hyperlink{libwebsockets_8h}{lib/libwebsockets.\+h}$>$}
|
|
|
|
enum lwsgs\+\_\+smtp\+\_\+states -\/ where we are in S\+M\+TP protocol sequence \begin{Desc}
|
|
\item[Enumerator]\par
|
|
\begin{description}
|
|
\index{L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE@{L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE@{L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+I\+D\+LE\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c}
|
|
}]awaiting new email \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG@{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG@{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+I\+NG\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933}
|
|
}]opening tcp connection to M\+TA \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED@{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED@{L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+C\+O\+N\+N\+E\+C\+T\+ED\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d}
|
|
}]tcp connection to M\+TA is connected \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+H\+E\+LO\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad}
|
|
}]sent the H\+E\+LO \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+F\+R\+OM\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab}
|
|
}]sent F\+R\+OM \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+TO\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83}
|
|
}]sent TO \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+D\+A\+TA\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14}
|
|
}]sent D\+A\+TA request \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+B\+O\+DY\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69}
|
|
}]sent the email body \index{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT}!Smtp@{Smtp}}\index{Smtp@{Smtp}!L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT@{L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT}}\item[{\em
|
|
L\+G\+S\+S\+M\+T\+P\+\_\+\+S\+E\+N\+T\+\_\+\+Q\+U\+IT\hypertarget{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5}{}\label{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5}
|
|
}]sent the session quit \end{description}
|
|
\end{Desc}
|
|
|
|
\begin{DoxyCode}
|
|
3867 \{
|
|
3868 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a29e5b0ecf75375b5a643faa3d6222b7c}{LGSSMTP\_IDLE},
|
|
3869 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab89442b7a3ca2b94c3cdcf33756eb933}{LGSSMTP\_CONNECTING},
|
|
3870 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0ab61778f70ecac007b334bb14942eb41d}{LGSSMTP\_CONNECTED},
|
|
3871 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a1dfec948a864205cec875f63cbe0d4ad}{LGSSMTP\_SENT\_HELO},
|
|
3872 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a929bb4623ff3f585108aba2a1b047fab}{LGSSMTP\_SENT\_FROM},
|
|
3873 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0aae20a0cb95b97a70f6b45d0ed2d5be83}{LGSSMTP\_SENT\_TO},
|
|
3874 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a85e3c452950c09a79086bff4b9be5c14}{LGSSMTP\_SENT\_DATA},
|
|
3875 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a38fba41f28d754e38079b31418a86a69}{LGSSMTP\_SENT\_BODY},
|
|
3876 \hyperlink{group__smtp_gga116be79bf44f9dc2a97f46e051fe4dc0a2c2ed16ffc572326e3040684084b21d5}{LGSSMTP\_SENT\_QUIT},
|
|
3877 \};
|
|
\end{DoxyCode}
|
|
|
|
|
|
\subsection{Function Documentation}
|
|
\index{Smtp@{Smtp}!lws\+\_\+email\+\_\+check@{lws\+\_\+email\+\_\+check}}
|
|
\index{lws\+\_\+email\+\_\+check@{lws\+\_\+email\+\_\+check}!Smtp@{Smtp}}
|
|
\subsubsection[{\texorpdfstring{lws\+\_\+email\+\_\+check(struct lws\+\_\+email $\ast$email)}{lws\_email\_check(struct lws\_email *email)}}]{\setlength{\rightskip}{0pt plus 5cm}L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN void lws\+\_\+email\+\_\+check (
|
|
\begin{DoxyParamCaption}
|
|
\item[{struct {\bf lws\+\_\+email} $\ast$}]{email}
|
|
\end{DoxyParamCaption}
|
|
)}\hypertarget{group__smtp_ga5e535e346d92a9daf00be33abf79d4eb}{}\label{group__smtp_ga5e535e346d92a9daf00be33abf79d4eb}
|
|
|
|
|
|
{\ttfamily \#include $<$\hyperlink{libwebsockets_8h}{lib/libwebsockets.\+h}$>$}
|
|
|
|
\hyperlink{group__smtp_ga5e535e346d92a9daf00be33abf79d4eb}{lws\+\_\+email\+\_\+check()} -\/ Request check for new email
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em email} & struct \hyperlink{structlws__email}{lws\+\_\+email} context to check\\
|
|
\hline
|
|
\end{DoxyParams}
|
|
Schedules a check for new emails in 1s... call this when you have queued an email for send. \index{Smtp@{Smtp}!lws\+\_\+email\+\_\+destroy@{lws\+\_\+email\+\_\+destroy}}
|
|
\index{lws\+\_\+email\+\_\+destroy@{lws\+\_\+email\+\_\+destroy}!Smtp@{Smtp}}
|
|
\subsubsection[{\texorpdfstring{lws\+\_\+email\+\_\+destroy(struct lws\+\_\+email $\ast$email)}{lws\_email\_destroy(struct lws\_email *email)}}]{\setlength{\rightskip}{0pt plus 5cm}L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN void lws\+\_\+email\+\_\+destroy (
|
|
\begin{DoxyParamCaption}
|
|
\item[{struct {\bf lws\+\_\+email} $\ast$}]{email}
|
|
\end{DoxyParamCaption}
|
|
)}\hypertarget{group__smtp_ga25298a5afc1074e13b2d5711a86432b2}{}\label{group__smtp_ga25298a5afc1074e13b2d5711a86432b2}
|
|
|
|
|
|
{\ttfamily \#include $<$\hyperlink{libwebsockets_8h}{lib/libwebsockets.\+h}$>$}
|
|
|
|
\hyperlink{group__smtp_ga25298a5afc1074e13b2d5711a86432b2}{lws\+\_\+email\+\_\+destroy()} -\/ stop using the struct \hyperlink{structlws__email}{lws\+\_\+email}
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em email} & the struct \hyperlink{structlws__email}{lws\+\_\+email} context\\
|
|
\hline
|
|
\end{DoxyParams}
|
|
Stop sending email using email and free allocations \index{Smtp@{Smtp}!lws\+\_\+email\+\_\+init@{lws\+\_\+email\+\_\+init}}
|
|
\index{lws\+\_\+email\+\_\+init@{lws\+\_\+email\+\_\+init}!Smtp@{Smtp}}
|
|
\subsubsection[{\texorpdfstring{lws\+\_\+email\+\_\+init(struct lws\+\_\+email $\ast$email, uv\+\_\+loop\+\_\+t $\ast$loop, int max\+\_\+content)}{lws\_email\_init(struct lws\_email *email, uv\_loop\_t *loop, int max\_content)}}]{\setlength{\rightskip}{0pt plus 5cm}L\+W\+S\+\_\+\+V\+I\+S\+I\+B\+LE L\+W\+S\+\_\+\+E\+X\+T\+E\+RN int lws\+\_\+email\+\_\+init (
|
|
\begin{DoxyParamCaption}
|
|
\item[{struct {\bf lws\+\_\+email} $\ast$}]{email, }
|
|
\item[{uv\+\_\+loop\+\_\+t $\ast$}]{loop, }
|
|
\item[{int}]{max\+\_\+content}
|
|
\end{DoxyParamCaption}
|
|
)}\hypertarget{group__smtp_ga77fc9b56a1bb39484844981ec375fc29}{}\label{group__smtp_ga77fc9b56a1bb39484844981ec375fc29}
|
|
|
|
|
|
{\ttfamily \#include $<$\hyperlink{libwebsockets_8h}{lib/libwebsockets.\+h}$>$}
|
|
|
|
\hyperlink{group__smtp_ga77fc9b56a1bb39484844981ec375fc29}{lws\+\_\+email\+\_\+init()} -\/ Initialize a struct \hyperlink{structlws__email}{lws\+\_\+email}
|
|
|
|
|
|
\begin{DoxyParams}{Parameters}
|
|
{\em email} & struct \hyperlink{structlws__email}{lws\+\_\+email} to init \\
|
|
\hline
|
|
{\em loop} & libuv loop to use \\
|
|
\hline
|
|
{\em max\+\_\+content} & max email content size\\
|
|
\hline
|
|
\end{DoxyParams}
|
|
Prepares a struct \hyperlink{structlws__email}{lws\+\_\+email} for use ending S\+M\+TP |