diff options
author | Vincent Richard <[email protected]> | 2006-10-02 16:02:42 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2006-10-02 16:02:42 +0000 |
commit | 5929fb4b367b265ff3eacc7af8555329c79bd942 (patch) | |
tree | accf85bfafc74ec463a228baba02e247fff90fe4 /doc | |
parent | Fixed bug #1096610: non-integral number of chars in RFC-2047 encoded words. (diff) | |
download | vmime-5929fb4b367b265ff3eacc7af8555329c79bd942.tar.gz vmime-5929fb4b367b265ff3eacc7af8555329c79bd942.zip |
Added a paragraph about time-out handler factory.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/book/net.tex | 32 |
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} + |