aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/book/net.tex32
1 files changed, 31 insertions, 1 deletions
diff --git a/doc/book/net.tex b/doc/book/net.tex
index 7cd5e36a..84f48c05 100644
--- a/doc/book/net.tex
+++ b/doc/book/net.tex
@@ -726,6 +726,30 @@ private:
};
\end{lstlisting}
+To make the service use your time-out handler, you need to write a factory
+class, to allow the service to create instances of the handler class. This
+is required because the service can use several connections to the server
+simultaneously, and each connection needs its own time-out handler.
+
+\begin{lstlisting}
+class myTimeoutHandlerFactory : public vmime::net::timeoutHandlerFactory
+{
+public:
+
+ ref <timeoutHandler> create()
+ {
+ return vmime::create <myTimeoutHandler>();
+ }
+};
+\end{lstlisting}
+
+Then, call the {\vcode setTimeoutHandlerFactory()} method on the service object
+to set the time-out handler factory to use during the session:
+
+\begin{lstlisting}
+theService->setTimeoutHandlerFactory(vmime::create <myTimeoutHandlerFactory>());
+\end{lstlisting}
+
% ============================================================================
\newpage
@@ -812,7 +836,7 @@ issuer, and so on.
To decide whether the server can be trusted or not, you have to verify that
\emph{each} certificate is valid (ie. is trusted). For more information
about X.509 and certificate verification, see related articles on Wikipedia
-\footnote{\url{See http://wikipedia.org/wiki/Public\_key\_certificate}}.
+\footnote{See \url{http://wikipedia.org/wiki/Public\_key\_certificate}}.
\subsubsection{Using the default certificate verifier} % .....................
@@ -944,3 +968,9 @@ public:
about which certificates to trust and which not. See {\vexample Example6} for
a basic cache implementation.}
+Finally, to make the service use your own certificate verifier, simply write:
+
+\begin{lstlisting}
+theService->setCertificateVerifier(vmime::create <myCertVerifier>());
+\end{lstlisting}
+