\section{TPProto::Https\-Socket Class Reference}
\label{classTPProto_1_1HttpsSocket}\index{TPProto::HttpsSocket@{TPProto::HttpsSocket}}
A \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket} for connecting over TLS over TCP to a server.  


{\tt \#include $<$httpssocket.h$>$}

Inheritance diagram for TPProto::Https\-Socket::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=3cm]{classTPProto_1_1HttpsSocket}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Https\-Socket} ()
\begin{CompactList}\small\item\em Default constructor. \item\end{CompactList}\item 
virtual {\bf $\sim$Https\-Socket} ()\label{classTPProto_1_1HttpsSocket_d6b54636e44fbc6fd7c7d93724439d58}

\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
bool {\bf connect} ()
\begin{CompactList}\small\item\em Connects to the host and port over HTTPS tunnel. \item\end{CompactList}\item 
void {\bf set\-Server\-Addr} (const char $\ast$host, const char $\ast$port=\char`\"{}443\char`\"{})
\begin{CompactList}\small\item\em Sets the server address and port to connect to. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf set\-Proxy\-Addr} (const char $\ast$host, const char $\ast$port=\char`\"{}3128\char`\"{})
\begin{CompactList}\small\item\em Sets the proxy address and port to connect to. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
bool {\bf on\-Connect} ()
\begin{CompactList}\small\item\em Called by connect when connection is established by before TLS handshake. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
A \doxyref{TPSocket}{p.}{classTPProto_1_1TPSocket} for connecting over TLS over TCP to a server. 



\subsection{Constructor \& Destructor Documentation}
\index{TPProto::HttpsSocket@{TPProto::Https\-Socket}!HttpsSocket@{HttpsSocket}}
\index{HttpsSocket@{HttpsSocket}!TPProto::HttpsSocket@{TPProto::Https\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}TPProto::Https\-Socket::Https\-Socket ()}\label{classTPProto_1_1HttpsSocket_127a573e953f63b18def8d447f50d778}


Default constructor. 

Sets up defaults, that will prevent connecting. 

\subsection{Member Function Documentation}
\index{TPProto::HttpsSocket@{TPProto::Https\-Socket}!connect@{connect}}
\index{connect@{connect}!TPProto::HttpsSocket@{TPProto::Https\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Https\-Socket::connect ()\hspace{0.3cm}{\tt  [virtual]}}\label{classTPProto_1_1HttpsSocket_a096e46484d17cb8dde86a3f9999dee1}


Connects to the host and port over HTTPS tunnel. 

\begin{Desc}
\item[Returns:]True if a new connection is made, false if already connected or if an error occured. \end{Desc}


Implements {\bf TPProto::TPSocket} \doxyref{}{p.}{classTPProto_1_1TPSocket_a5e42ff68f8625cde3e083a95cbf7d5b}.\index{TPProto::HttpsSocket@{TPProto::Https\-Socket}!setServerAddr@{setServerAddr}}
\index{setServerAddr@{setServerAddr}!TPProto::HttpsSocket@{TPProto::Https\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Https\-Socket::set\-Server\-Addr (const char $\ast$ {\em host}, const char $\ast$ {\em port} = {\tt \char`\"{}443\char`\"{}})}\label{classTPProto_1_1HttpsSocket_6ac22a6ded22b081ac14d48fce532bb3}


Sets the server address and port to connect to. 

Host can be DNS name or ip address. Post can be port name or number. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em host}]Host to connect to. \item[{\em port}]Port to connect to. \end{description}
\end{Desc}


Reimplemented from {\bf TPProto::Tls\-Socket} \doxyref{}{p.}{classTPProto_1_1TlsSocket_0ac2ebafa231dabe36473799a509f635}.\index{TPProto::HttpsSocket@{TPProto::Https\-Socket}!setProxyAddr@{setProxyAddr}}
\index{setProxyAddr@{setProxyAddr}!TPProto::HttpsSocket@{TPProto::Https\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void TPProto::Https\-Socket::set\-Proxy\-Addr (const char $\ast$ {\em host}, const char $\ast$ {\em port} = {\tt \char`\"{}3128\char`\"{}})\hspace{0.3cm}{\tt  [static]}}\label{classTPProto_1_1HttpsSocket_be33abe7b9396cdf42eb099016301a56}


Sets the proxy address and port to connect to. 

Host can be DNS name or ip address. Post can be port name or number. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em host}]Host to connect to. \item[{\em port}]Port to connect to. \end{description}
\end{Desc}
\index{TPProto::HttpsSocket@{TPProto::Https\-Socket}!onConnect@{onConnect}}
\index{onConnect@{onConnect}!TPProto::HttpsSocket@{TPProto::Https\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool TPProto::Https\-Socket::on\-Connect ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classTPProto_1_1HttpsSocket_b0757cd0d62dcab93988f8fc615d38c1}


Called by connect when connection is established by before TLS handshake. 

\begin{Desc}
\item[Returns:]True to continue, false if there is an error and need to abort. \end{Desc}


Reimplemented from {\bf TPProto::Tls\-Socket} \doxyref{}{p.}{classTPProto_1_1TlsSocket_ce3f763ac411267b389371eb4540004d}.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
tpproto/{\bf httpssocket.h}\item 
tpproto/httpssocket.cpp\end{CompactItemize}
