\section{KIO::TCPSlave\-Base Class Reference}
\label{classKIO_1_1TCPSlaveBase}\index{KIO::TCPSlaveBase@{KIO::TCPSlaveBase}}
There are two classes that specifies the protocol between application (job) and kioslave.  


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

Inheritance diagram for KIO::TCPSlave\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=71pt]{classKIO_1_1TCPSlaveBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::TCPSlave\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=298pt]{classKIO_1_1TCPSlaveBase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf TCPSlave\-Base} (unsigned short int default\-Port, const {\bf QCString} \&protocol, const {\bf QCString} \&pool\-Socket, const {\bf QCString} \&app\-Socket)\label{classKIO_1_1TCPSlaveBase_a0}

\item 
{\bf TCPSlave\-Base} (unsigned short int default\-Port, const {\bf QCString} \&protocol, const {\bf QCString} \&pool\-Socket, const {\bf QCString} \&app\-Socket, bool use\-SSL)\label{classKIO_1_1TCPSlaveBase_a1}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
KDE\_\-DEPRECATED ssize\_\-t {\bf Write} (const void $\ast$data, ssize\_\-t len)
\item 
KDE\_\-DEPRECATED ssize\_\-t {\bf Read} (void $\ast$data, ssize\_\-t len)
\item 
KDE\_\-DEPRECATED ssize\_\-t {\bf Read\-Line} (char $\ast$data, ssize\_\-t len)
\item 
KDE\_\-DEPRECATED unsigned short int {\bf Get\-Port} (unsigned short int p)
\item 
KDE\_\-DEPRECATED bool {\bf Connect\-To\-Host} (const {\bf QString} \&host, unsigned int port, bool send\-Error)
\item 
KDE\_\-DEPRECATED void {\bf Close\-Descriptor} ()
\item 
KDE\_\-DEPRECATED bool {\bf At\-EOF} ()
\item 
KDE\_\-DEPRECATED bool {\bf Initialize\-SSL} ()
\item 
KDE\_\-DEPRECATED void {\bf Clean\-SSL} ()
\item 
ssize\_\-t {\bf write} (const void $\ast$data, ssize\_\-t len)
\item 
ssize\_\-t {\bf read} (void $\ast$data, ssize\_\-t len)
\item 
ssize\_\-t {\bf read\-Line} (char $\ast$data, ssize\_\-t len)
\item 
void {\bf set\-Block\-Size} (int sz)
\item 
unsigned short int {\bf port} (unsigned short int \_\-port)
\item 
bool {\bf connect\-To\-Host} (const {\bf QString} \&host, unsigned int port, bool send\-Error=true)
\item 
bool {\bf using\-SSL} () const 
\item 
bool {\bf using\-TLS} () const 
\item 
bool {\bf using\-TLS} ()
\item 
bool {\bf can\-Use\-TLS} ()
\item 
int {\bf start\-TLS} ()
\item 
void {\bf stop\-TLS} ()
\item 
void {\bf close\-Descriptor} ()
\item 
bool {\bf at\-End} ()
\item 
void {\bf set\-SSLMeta\-Data} ()
\item 
bool {\bf initialize\-SSL} ()
\item 
void {\bf clean\-SSL} ()
\item 
bool {\bf is\-Connection\-Valid} ()
\item 
int {\bf connect\-Result} ()
\item 
bool {\bf wait\-For\-Response} (int t)
\item 
void {\bf set\-Block\-Connection} (bool b)
\item 
void {\bf set\-Connect\-Timeout} (int t)
\item 
bool {\bf is\-SSLTunnel\-Enabled} ()
\item 
void {\bf set\-Enable\-SSLTunnel} (bool enable)
\item 
void {\bf set\-Real\-Host} (const {\bf QString} \&real\-Host)
\item 
void {\bf do\-Constructor\-Stuff} ()\label{classKIO_1_1TCPSlaveBase_b34}

\item 
int {\bf verify\-Certificate} ()\label{classKIO_1_1TCPSlaveBase_b35}

\item 
void {\bf certificate\-Prompt} ()\label{classKIO_1_1TCPSlaveBase_b36}

\item 
bool {\bf user\-Aborted} () const \label{classKIO_1_1TCPSlaveBase_b37}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKIO_1_1TCPSlaveBase_b38}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
int {\bf m\_\-i\-Sock}\label{classKIO_1_1TCPSlaveBase_p0}

\item 
bool {\bf m\_\-b\-Is\-SSL}\label{classKIO_1_1TCPSlaveBase_p1}

\item 
unsigned short int {\bf m\_\-i\-Port}\label{classKIO_1_1TCPSlaveBase_p2}

\item 
unsigned short int {\bf m\_\-i\-Default\-Port}\label{classKIO_1_1TCPSlaveBase_p3}

\item 
{\bf QCString} {\bf m\_\-s\-Service\-Name}\label{classKIO_1_1TCPSlaveBase_p4}

\item 
FILE $\ast$ {\bf fp}\label{classKIO_1_1TCPSlaveBase_p5}

\end{CompactItemize}


\subsection{Detailed Description}
There are two classes that specifies the protocol between application (job) and kioslave. 

{\bf Slave\-Interface}{\rm (p.\,\pageref{classKIO_1_1SlaveInterface})} is the class to use on the application end, {\bf Slave\-Base}{\rm (p.\,\pageref{classKIO_1_1SlaveBase})} is the one to use on the slave end.

Slave implementations should simply inherit {\bf Slave\-Base}{\rm (p.\,\pageref{classKIO_1_1SlaveBase})}

A call to foo() results in a call to slot\-Foo() on the other end. 



Definition at line 45 of file tcpslavebase.h.

\subsection{Member Function Documentation}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!Write@{Write}}
\index{Write@{Write}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED ssize\_\-t KIO::TCPSlave\-Base::Write (const void $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b0}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 63 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!Read@{Read}}
\index{Read@{Read}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED ssize\_\-t KIO::TCPSlave\-Base::Read (void $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b1}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 68 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!ReadLine@{ReadLine}}
\index{ReadLine@{ReadLine}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED ssize\_\-t KIO::TCPSlave\-Base::Read\-Line (char $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b2}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 73 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!GetPort@{GetPort}}
\index{GetPort@{GetPort}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED unsigned short int KIO::TCPSlave\-Base::Get\-Port (unsigned short int {\em p})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b3}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 78 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!ConnectToHost@{ConnectToHost}}
\index{ConnectToHost@{ConnectToHost}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED bool KIO::TCPSlave\-Base::Connect\-To\-Host (const {\bf QString} \& {\em host}, unsigned int {\em port}, bool {\em send\-Error})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b4}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 83 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!CloseDescriptor@{CloseDescriptor}}
\index{CloseDescriptor@{CloseDescriptor}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED void KIO::TCPSlave\-Base::Close\-Descriptor ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b5}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 89 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!AtEOF@{AtEOF}}
\index{AtEOF@{AtEOF}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED bool KIO::TCPSlave\-Base::At\-EOF ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b6}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 94 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!InitializeSSL@{InitializeSSL}}
\index{InitializeSSL@{InitializeSSL}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED bool KIO::TCPSlave\-Base::Initialize\-SSL ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b7}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 99 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!CleanSSL@{CleanSSL}}
\index{CleanSSL@{CleanSSL}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KDE\_\-DEPRECATED void KIO::TCPSlave\-Base::Clean\-SSL ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b8}


\begin{Desc}
\item[{\bf Deprecated}]Due to inconsistency with {\bf KDE} naming convention. \end{Desc}


Definition at line 104 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!write@{write}}
\index{write@{write}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ssize\_\-t KIO::TCPSlave\-Base::write (const void $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b9}


This function acts like standard write function call except it is also capable of making SSL or SOCKS connections. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]info to be sent to remote machine \item[{\em len}]the length of the data to be sent\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual size of the data that was sent \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!read@{read}}
\index{read@{read}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ssize\_\-t KIO::TCPSlave\-Base::read (void $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b10}


This function acts like standard read function call except it is also capable of deciphering SSL data as well as handling data over SOCKSified connections. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]storage for the info read from server \item[{\em len}]lenght of the info to read from the server\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual size of data that was obtained \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!readLine@{readLine}}
\index{readLine@{readLine}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ssize\_\-t KIO::TCPSlave\-Base::read\-Line (char $\ast$ {\em data}, ssize\_\-t {\em len})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b11}


Same as above except it reads data one line at a time. 

\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setBlockSize@{setBlockSize}}
\index{setBlockSize@{setBlockSize}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-Block\-Size (int {\em sz})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b12}


Sets the maximum size of blocks read in during calls to {\bf read\-Line()}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b11})}. 

This allows a slave to optimize for the protocol which it implements. Ideally this should be (common\_\-line\_\-length+1) or so. Making this too large will have adverse effects on performance. Initial/default value is 256(bytes) \index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!port@{port}}
\index{port@{port}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short int KIO::TCPSlave\-Base::port (unsigned short int {\em \_\-port})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b13}


Determines the appropriate port to use. 

This functions attempts to discover the appropriate port.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-port}]the port to try, if it works, it is returned \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the default port if the given port doesn't work \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!connectToHost@{connectToHost}}
\index{connectToHost@{connectToHost}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::connect\-To\-Host (const {\bf QString} \& {\em host}, unsigned int {\em port}, bool {\em send\-Error} = {\tt true})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b14}


Performs the initial TCP connection stuff and/or SSL handshaking as necessary. 

Please note that unlike its deprecated counterpart, this function allows you to disable any error message from being sent back to the calling application! You can then use the {\bf connect\-Result()}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b27})} function to determine the result of the request for connection.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em host}]hostname \item[{\em port}]port number \item[{\em send\-Error}]if true sends error message to calling app.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]on succes, true is returned. on failure, false is returned and an appropriate error message is send to the application. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!usingSSL@{usingSSL}}
\index{usingSSL@{usingSSL}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::using\-SSL () const\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b15}


Are we using SSL? 

\begin{Desc}
\item[Returns:]if so, true is returned. if not, true isn't returned. \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}


Definition at line 183 of file tcpslavebase.h.\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!usingTLS@{usingTLS}}
\index{usingTLS@{usingTLS}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::using\-TLS () const\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b16}


Are we using TLS? 

\begin{Desc}
\item[Returns:]if so, true is returned. if not, true isn't returned. \end{Desc}
\begin{Desc}
\item[Since:]3.2 \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!usingTLS@{usingTLS}}
\index{usingTLS@{usingTLS}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::using\-TLS ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b17}


\begin{Desc}
\item[{\bf Deprecated}]kept for binary compatibility Are we using TLS? \end{Desc}
\begin{Desc}
\item[Returns:]if so, true is returned. if not, true isn't returned. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!canUseTLS@{canUseTLS}}
\index{canUseTLS@{canUseTLS}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::can\-Use\-TLS ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b18}


Can we use TLS? 

\begin{Desc}
\item[Returns:]if so, true is returned. if not, true isn't returned. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!startTLS@{startTLS}}
\index{startTLS@{startTLS}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIO::TCPSlave\-Base::start\-TLS ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b19}


Start using TLS on the connection. 

\begin{Desc}
\item[Returns:]on success, 1 is returned. on failure, 0 is returned. on TLS init failure, -1 is returned. on connect failure, -2 is returned. on certificate failure, -3 is returned. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!stopTLS@{stopTLS}}
\index{stopTLS@{stopTLS}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::stop\-TLS ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b20}


Stop using TLS on the connection. 

\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!closeDescriptor@{closeDescriptor}}
\index{closeDescriptor@{closeDescriptor}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::close\-Descriptor ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b21}


Closes the current file descriptor. 

Call this function to properly close up the socket since it also takes care to prroperly close the stdio fstream stuff, as well as sets the socket back to -1 \index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!atEnd@{atEnd}}
\index{atEnd@{atEnd}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::at\-End ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b22}


Returns true when end of data is reached. 

\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setSSLMetaData@{setSSLMetaData}}
\index{setSSLMetaData@{setSSLMetaData}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-SSLMeta\-Data ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b23}


Call this if you use persistent connections and want all the metadata restored. 

This is particularly important for SSL sessions since the app needs to know the state of connection, certificates, etc. \index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!initializeSSL@{initializeSSL}}
\index{initializeSSL@{initializeSSL}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::initialize\-SSL ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b24}


Initializs all SSL variables. 

\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!cleanSSL@{cleanSSL}}
\index{cleanSSL@{cleanSSL}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::clean\-SSL ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b25}


Cleans up all SSL settings. 

\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!isConnectionValid@{isConnectionValid}}
\index{isConnectionValid@{isConnectionValid}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::is\-Connection\-Valid ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b26}


Determines whether or not we are still connected to the remote machine. 

This method may fail to detect a closed SSL connection.

return {\tt true} if the socket is still active or false otherwise. \index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!connectResult@{connectResult}}
\index{connectResult@{connectResult}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KIO::TCPSlave\-Base::connect\-Result ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b27}


Returns the status of the connection. 

This function allows you to invoke Connect\-To\-Host with the {\tt send\-Error} flag set to false so that you can send the appropriate error message back to the calling io-slave.

\begin{Desc}
\item[Returns:]the status code as returned by KExtended\-Socket. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!waitForResponse@{waitForResponse}}
\index{waitForResponse@{waitForResponse}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::wait\-For\-Response (int {\em t})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b28}


Wait for some type of activity on the socket for the period specified by {\tt t}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]length of time in seconds that we should monitor the socket before timing out.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if any activity was seen on the socket before the timeout value was reached, false otherwise. \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setBlockConnection@{setBlockConnection}}
\index{setBlockConnection@{setBlockConnection}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-Block\-Connection (bool {\em b})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b29}


Sets the mode of the connection to blocking or non-blocking. 

Be sure to call this function before calling connect\-To\-Host. Otherwise, this setting will not have any effect until the next {\tt connect\-To\-Host}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em b}]true to make the connection a blocking one, false otherwise. \end{description}
\end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setConnectTimeout@{setConnectTimeout}}
\index{setConnectTimeout@{setConnectTimeout}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-Connect\-Timeout (int {\em t})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b30}


Sets how long to wait for orignally connecting to the requested before timinig out. 

Be sure to call this function before calling Connect\-To\-Host, otherwise the setting will not take effect until the next call to {\tt Connect\-To\-Host}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em t}]timeout value \end{description}
\end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!isSSLTunnelEnabled@{isSSLTunnelEnabled}}
\index{isSSLTunnelEnabled@{isSSLTunnelEnabled}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::is\-SSLTunnel\-Enabled ()\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b31}


Returns true if SSL tunneling is enabled. 

\begin{Desc}
\item[See also:]set\-Enable\-SSl\-Tunnel \end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setEnableSSLTunnel@{setEnableSSLTunnel}}
\index{setEnableSSLTunnel@{setEnableSSLTunnel}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-Enable\-SSLTunnel (bool {\em enable})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b32}


Set up SSL tunneling mode. 

Calling this function with a {\tt true} argument will allow you to temprarly ignore the {\tt m\_\-b\-Is\-SSL} flag setting and make a non-SSL connection. It is mostly useful for making connections to SSL sites through a non-transparent proxy server (i.e. most proxy servers out there).

Note that once you have successfully \char`\"{}tunneled\char`\"{} through the proxy server you must call this function with its argument set to false to properly connect to the SSL site.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em enable}]if true SSL Tunneling will be enabled \end{description}
\end{Desc}
\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!setRealHost@{setRealHost}}
\index{setRealHost@{setRealHost}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KIO::TCPSlave\-Base::set\-Real\-Host (const {\bf QString} \& {\em real\-Host})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b33}


Sets up the the real hostname for an SSL connection that goes through a proxy server. 

This function is essential in making sure that the real hostname is used for validating certificates from SSL sites!

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em real\-Host}]the actual host name we are connecting to \end{description}
\end{Desc}


The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
tcpslavebase.h\end{CompactItemize}
