\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=70pt]{classKIO_1_1TCPSlaveBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KIO::TCPSlave\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=277pt]{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 
ssize\_\-t {\bf Write} (const  void $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
ssize\_\-t {\bf Read} (void $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
ssize\_\-t {\bf Read\-Line} (char $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
unsigned short int {\bf Get\-Port} (unsigned short int p)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
bool {\bf Connect\-To\-Host} (const  {\bf QString} \&host, unsigned int port, bool send\-Error)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
void {\bf Close\-Descriptor} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
bool {\bf At\-EOF} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
bool {\bf Initialize\-SSL} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
void {\bf Clean\-SSL} ()
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. \item\end{CompactList}\item 
ssize\_\-t {\bf write} (const  void $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em This function acts like standard write function call except it is also capable of making SSL or SOCKS connections. \item\end{CompactList}\item 
ssize\_\-t {\bf read} (void $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
ssize\_\-t {\bf read\-Line} (char $\ast$data, ssize\_\-t len)
\begin{CompactList}\small\item\em Same as above except it reads data one line at a time. \item\end{CompactList}\item 
void {\bf set\-Block\-Size} (int sz)
\begin{CompactList}\small\item\em Sets the maximum size of blocks read in during calls to {\bf read\-Line()}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b11})}. \item\end{CompactList}\item 
unsigned short int {\bf port} (unsigned short int)
\begin{CompactList}\small\item\em Determines the appropiate port to use. \item\end{CompactList}\item 
bool {\bf connect\-To\-Host} (const  {\bf QString} \&host, unsigned int port, bool send\-Error=true)
\begin{CompactList}\small\item\em Performs the initial TCP connection stuff and/or SSL handshaking as necessary. \item\end{CompactList}\item 
bool {\bf using\-TLS} ()
\begin{CompactList}\small\item\em Are we using TLS? \item\end{CompactList}\item 
bool {\bf can\-Use\-TLS} ()
\begin{CompactList}\small\item\em Can we use TLS? \item\end{CompactList}\item 
int {\bf start\-TLS} ()
\begin{CompactList}\small\item\em Start using TLS on the connection. \item\end{CompactList}\item 
void {\bf stop\-TLS} ()
\begin{CompactList}\small\item\em Stop using TLS on the connection. \item\end{CompactList}\item 
void {\bf close\-Descriptor} ()
\begin{CompactList}\small\item\em Closes the current file descriptor. \item\end{CompactList}\item 
bool {\bf at\-End} ()
\begin{CompactList}\small\item\em Returns true when end of data is reached. \item\end{CompactList}\item 
void {\bf set\-SSLMeta\-Data} ()
\begin{CompactList}\small\item\em Call this if you use persistent connections and want all the metadata restored. \item\end{CompactList}\item 
bool {\bf initialize\-SSL} ()
\begin{CompactList}\small\item\em Initializs all SSL variables. \item\end{CompactList}\item 
void {\bf clean\-SSL} ()
\begin{CompactList}\small\item\em Cleans up all SSL settings. \item\end{CompactList}\item 
bool {\bf is\-Connection\-Valid} ()
\begin{CompactList}\small\item\em Determines whether or not we are still connected to the remote machine. \item\end{CompactList}\item 
int {\bf connect\-Result} ()
\begin{CompactList}\small\item\em Returns the status of the connection. \item\end{CompactList}\item 
bool {\bf wait\-For\-Response} (int t)
\begin{CompactList}\small\item\em Wait for some type of activity on the socket for the period specified by {\tt t}. \item\end{CompactList}\item 
void {\bf set\-Block\-Connection} (bool b)
\begin{CompactList}\small\item\em Sets the mode of the connection to blocking or non-blocking. \item\end{CompactList}\item 
void {\bf set\-Connect\-Timeout} (int t)
\begin{CompactList}\small\item\em Sets how long to wait for orignally connecting to the requested before timinig out. \item\end{CompactList}\item 
bool {\bf is\-SSLTunnel\-Enabled} ()
\begin{CompactList}\small\item\em Returns true if SSL tunneling is enabled. \item\end{CompactList}\item 
void {\bf set\-Enable\-SSLTunnel} (bool enable)
\begin{CompactList}\small\item\em Set up SSL tunneling mode. \item\end{CompactList}\item 
void {\bf set\-Real\-Host} (const  {\bf QString} \&real\-Host)
\begin{CompactList}\small\item\em Sets up the the real hostname for an SSL connection that goes through a proxy server. \item\end{CompactList}\item 
void {\bf do\-Constructor\-Stuff} ()\label{classKIO_1_1TCPSlaveBase_b32}

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

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

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

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

\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 48 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}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}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 66 of file tcpslavebase.h.

References write().\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  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b1}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 71 of file tcpslavebase.h.

References read().\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  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b2}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 76 of file tcpslavebase.h.

References read\-Line().\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!GetPort@{GetPort}}
\index{GetPort@{GetPort}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short int KIO::TCPSlave\-Base::Get\-Port (unsigned short int {\em p})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b3}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 81 of file tcpslavebase.h.

References port().\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})\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b4}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 86 of file tcpslavebase.h.

References connect\-To\-Host().\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  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b5}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 92 of file tcpslavebase.h.

References close\-Descriptor().\index{KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}!AtEOF@{AtEOF}}
\index{AtEOF@{AtEOF}!KIO::TCPSlaveBase@{KIO::TCPSlave\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KIO::TCPSlave\-Base::At\-EOF ()\hspace{0.3cm}{\tt  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b6}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 97 of file tcpslavebase.h.

References at\-End().\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  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b7}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 102 of file tcpslavebase.h.

References initialize\-SSL().\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  [inline, protected]}}\label{classKIO_1_1TCPSlaveBase_b8}


{\bf This class or method is obsolete, it is provided for compatibility only.} Due to inconsistency with {\bf KDE} naming convention. 



Definition at line 107 of file tcpslavebase.h.

References clean\-SSL().\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}


Referenced by Write().\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}


Referenced by Read().\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. 



Referenced by Read\-Line().\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 {\em int})\hspace{0.3cm}{\tt  [protected]}}\label{classKIO_1_1TCPSlaveBase_b13}


Determines the appropiate port to use. 

This functions attempts to discover the appropriate port.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em port}]\end{description}
\end{Desc}


Referenced by Get\-Port().\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} = 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_b25})}() 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}


Referenced by Connect\-To\-Host().\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_b15}


Are we using TLS? 

\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_b16}


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_b17}


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_b18}


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_b19}


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 

Referenced by Close\-Descriptor().\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_b20}


Returns true when end of data is reached. 



Referenced by At\-EOF().\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_b21}


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

This is particularily 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_b22}


Initializs all SSL variables. 



Referenced by Initialize\-SSL().\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_b23}


Cleans up all SSL settings. 



Referenced by Clean\-SSL().\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_b24}


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_b25}


Returns the status of the connection. 

This function allows you to invoke {\bf Connect\-To\-Host}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b4})} 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 {\bf 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_b26}


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_b27}


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

Be sure to call this function before calling {\bf Connect\-To\-Host}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b4})}. 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_b28}


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

Be sure to call this function before calling {\bf Connect\-To\-Host}{\rm (p.\,\pageref{classKIO_1_1TCPSlaveBase_b4})}, 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_b29}


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_b30}


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_b31}


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}
