\section{KNetwork::KBuffered\-Socket Class Reference}
\label{classKNetwork_1_1KBufferedSocket}\index{KNetwork::KBufferedSocket@{KNetwork::KBufferedSocket}}
Buffered stream sockets.  


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

Inheritance diagram for KNetwork::KBuffered\-Socket:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{classKNetwork_1_1KBufferedSocket__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNetwork::KBuffered\-Socket:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=150pt]{classKNetwork_1_1KBufferedSocket__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf bytes\-Written} (int bytes)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KBuffered\-Socket} (const {\bf QString} \&node=QString::null, const {\bf QString} \&service=QString::null, {\bf QObject} $\ast${\bf parent}=0L, const char $\ast${\bf name}=0L)
\item 
virtual {\bf $\sim$KBuffered\-Socket} ()
\item 
virtual void {\bf set\-Socket\-Device} ({\bf KSocket\-Device} $\ast$device)
\item 
virtual void {\bf close} ()
\item 
virtual Q\_\-LONG {\bf bytes\-Available} () const 
\item 
virtual Q\_\-LONG {\bf wait\-For\-More} (int msecs, bool $\ast$timeout=0L)
\item 
virtual Q\_\-LONG {\bf read\-Block} (char $\ast$data, Q\_\-ULONG maxlen)
\item 
virtual Q\_\-LONG {\bf read\-Block} (char $\ast$data, Q\_\-ULONG maxlen, {\bf KSocket\-Address} \&from)
\item 
virtual Q\_\-LONG {\bf peek\-Block} (char $\ast$data, Q\_\-ULONG maxlen)
\item 
virtual Q\_\-LONG {\bf peek\-Block} (char $\ast$data, Q\_\-ULONG maxlen, {\bf KSocket\-Address} \&from)
\item 
virtual Q\_\-LONG {\bf write\-Block} (const char $\ast$data, Q\_\-ULONG len)
\item 
virtual Q\_\-LONG {\bf write\-Block} (const char $\ast$data, Q\_\-ULONG len, const {\bf KSocket\-Address} \&to)
\item 
virtual void {\bf enable\-Read} (bool enable)
\item 
virtual void {\bf enable\-Write} (bool enable)
\item 
void {\bf set\-Input\-Buffering} (bool enable)
\item 
{\bf KIOBuffer\-Base} $\ast$ {\bf input\-Buffer} ()
\item 
void {\bf set\-Output\-Buffering} (bool enable)
\item 
{\bf KIOBuffer\-Base} $\ast$ {\bf output\-Buffer} ()
\item 
virtual Q\_\-ULONG {\bf bytes\-To\-Write} () const 
\item 
virtual void {\bf close\-Now} ()
\item 
bool {\bf can\-Read\-Line} () const 
\item 
{\bf QCString} {\bf read\-Line} ()
\item 
void {\bf reset} ()
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Read\-Activity} ()
\item 
virtual void {\bf slot\-Write\-Activity} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual bool {\bf set\-Socket\-Options} (int opts)
\item 
virtual void {\bf state\-Changing} ({\bf Socket\-State} new\-State)
\end{CompactItemize}


\subsection{Detailed Description}
Buffered stream sockets. 

This class allows the user to create and operate buffered stream sockets such as those used in most Internet connections. This class is also the one that resembles the most to the old {\bf QSocket} implementation.

Objects of this type operate only in non-blocking mode. A call to set\-Blocking(true) will result in an error.

\begin{Desc}
\item[Author:]Thiago Macieira $<${\tt thiago.macieira@kdemail.net}$>$ \end{Desc}




Definition at line 52 of file kbufferedsocket.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!KBufferedSocket@{KBufferedSocket}}
\index{KBufferedSocket@{KBufferedSocket}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KBuffered\-Socket::KBuffered\-Socket (const {\bf QString} \& {\em node} = {\tt QString::null}, const {\bf QString} \& {\em service} = {\tt QString::null}, {\bf QObject} $\ast$ {\em parent} = {\tt 0L}, const char $\ast$ {\em name} = {\tt 0L})}\label{classKNetwork_1_1KBufferedSocket_a0}


Default constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em node}]destination host \item[{\em service}]destination service to connect to \item[{\em parent}]the parent object for this object \item[{\em name}]the internal name for this object \end{description}
\end{Desc}


Definition at line 50 of file kbufferedsocket.cpp.

References set\-Input\-Buffering(), and set\-Output\-Buffering().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!~KBufferedSocket@{$\sim$KBufferedSocket}}
\index{~KBufferedSocket@{$\sim$KBufferedSocket}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KBuffered\-Socket::$\sim${\bf KBuffered\-Socket} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a1}


Destructor. 



Definition at line 59 of file kbufferedsocket.cpp.

References close\-Now().

\subsection{Member Function Documentation}
\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!setSocketDevice@{setSocketDevice}}
\index{setSocketDevice@{setSocketDevice}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::set\-Socket\-Device ({\bf KSocket\-Device} $\ast$ {\em device})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a2}


Be sure to catch new devices. 



Reimplemented from {\bf KNetwork::KSocket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KSocketBase_a11})}.

Definition at line 67 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!setSocketOptions@{setSocketOptions}}
\index{setSocketOptions@{setSocketOptions}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KBuffered\-Socket::set\-Socket\-Options (int {\em opts})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKNetwork_1_1KBufferedSocket_b0}


Buffered sockets can only operate in non-blocking mode. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_b0})}.

Definition at line 73 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!close@{close}}
\index{close@{close}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::close ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a3}


Closes the socket for new data, but allow data that had been buffered for output with {\bf write\-Block}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a10})} to be still be written. 

\begin{Desc}
\item[See also:]{\bf close\-Now}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a19})} \end{Desc}


Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a17})}.

Definition at line 82 of file kbufferedsocket.cpp.

References close\-Now(), KNetwork::KSocket\-Device::read\-Notifier(), QSocket\-Notifier::set\-Enabled(), KNetwork::KClient\-Socket\-Base::set\-State(), KNetwork::KSocket\-Base::socket\-Device(), and KNetwork::KClient\-Socket\-Base::state\-Changed().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!bytesAvailable@{bytesAvailable}}
\index{bytesAvailable@{bytesAvailable}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::bytes\-Available () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a4}


Make use of the buffers. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a19})}.

Definition at line 96 of file kbufferedsocket.cpp.

Referenced by wait\-For\-More().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!waitForMore@{waitForMore}}
\index{waitForMore@{waitForMore}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::wait\-For\-More (int {\em msecs}, bool $\ast$ {\em timeout} = {\tt 0L})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a5}


Make use of buffers. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a20})}.

Definition at line 104 of file kbufferedsocket.cpp.

References bytes\-Available(), KNetwork::KActive\-Socket\-Base::reset\-Error(), and slot\-Read\-Activity().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!readBlock@{readBlock}}
\index{readBlock@{readBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::read\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a6}


Reads data from the socket. 

Make use of buffers. 

Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a21})}.

Definition at line 116 of file kbufferedsocket.cpp.

References KNetwork::KClient\-Socket\-Base::got\-Error(), KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by read\-Block().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!readBlock@{readBlock}}
\index{readBlock@{readBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::read\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen}, {\bf KSocket\-Address} \& {\em from})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a7}


This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reads data from a socket.

The {\tt from} parameter is always set to {\bf peer\-Address()}{\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a28})} 

Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a22})}.

Definition at line 132 of file kbufferedsocket.cpp.

References KNetwork::KClient\-Socket\-Base::peer\-Address(), and read\-Block().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!peekBlock@{peekBlock}}
\index{peekBlock@{peekBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::peek\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a8}


Peeks data from the socket. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a23})}.

Definition at line 138 of file kbufferedsocket.cpp.

References KNetwork::KClient\-Socket\-Base::got\-Error(), KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by peek\-Block().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!peekBlock@{peekBlock}}
\index{peekBlock@{peekBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::peek\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen}, {\bf KSocket\-Address} \& {\em from})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a9}


This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Peeks data from the socket.

The {\tt from} parameter is always set to {\bf peer\-Address()}{\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a28})} 

Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a24})}.

Definition at line 154 of file kbufferedsocket.cpp.

References peek\-Block(), and KNetwork::KClient\-Socket\-Base::peer\-Address().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!writeBlock@{writeBlock}}
\index{writeBlock@{writeBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::write\-Block (const char $\ast$ {\em data}, Q\_\-ULONG {\em len})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a10}


Writes data to the socket. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a25})}.

Definition at line 160 of file kbufferedsocket.cpp.

References KNetwork::KClient\-Socket\-Base::got\-Error(), KNetwork::KActive\-Socket\-Base::reset\-Error(), QSocket\-Notifier::set\-Enabled(), KNetwork::KActive\-Socket\-Base::set\-Error(), KNetwork::KSocket\-Base::socket\-Device(), KNetwork::KClient\-Socket\-Base::state(), and KNetwork::KSocket\-Device::write\-Notifier().

Referenced by write\-Block().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!writeBlock@{writeBlock}}
\index{writeBlock@{writeBlock}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KBuffered\-Socket::write\-Block (const char $\ast$ {\em data}, Q\_\-ULONG {\em len}, const {\bf KSocket\-Address} \& {\em to})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a11}


This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Writes data to the socket.

The {\tt to} parameter is discarded. 

Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a26})}.

Definition at line 190 of file kbufferedsocket.cpp.

References write\-Block().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!enableRead@{enableRead}}
\index{enableRead@{enableRead}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::enable\-Read (bool {\em enable})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a12}


Catch changes. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a30})}.

Definition at line 197 of file kbufferedsocket.cpp.

References KNetwork::KSocket\-Device::read\-Notifier(), QSocket\-Notifier::set\-Enabled(), QTimer::single\-Shot(), slot\-Read\-Activity(), KNetwork::KSocket\-Base::socket\-Device(), and KNetwork::KClient\-Socket\-Base::state().

Referenced by state\-Changing().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!enableWrite@{enableWrite}}
\index{enableWrite@{enableWrite}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::enable\-Write (bool {\em enable})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a13}


Catch changes. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a32})}.

Definition at line 214 of file kbufferedsocket.cpp.

References QSocket\-Notifier::set\-Enabled(), KNetwork::KSocket\-Base::socket\-Device(), and KNetwork::KSocket\-Device::write\-Notifier().

Referenced by state\-Changing().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!setInputBuffering@{setInputBuffering}}
\index{setInputBuffering@{setInputBuffering}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::set\-Input\-Buffering (bool {\em enable})}\label{classKNetwork_1_1KBufferedSocket_a14}


Sets the use of input buffering. 



Definition at line 244 of file kbufferedsocket.cpp.

References KNetwork::KSocket\-Base::mutex().

Referenced by KBuffered\-Socket().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!inputBuffer@{inputBuffer}}
\index{inputBuffer@{inputBuffer}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIOBuffer\-Base} $\ast$ KBuffered\-Socket::input\-Buffer ()}\label{classKNetwork_1_1KBufferedSocket_a15}


Retrieves the input buffer object. 



Definition at line 258 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!setOutputBuffering@{setOutputBuffering}}
\index{setOutputBuffering@{setOutputBuffering}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::set\-Output\-Buffering (bool {\em enable})}\label{classKNetwork_1_1KBufferedSocket_a16}


Sets the use of output buffering. 



Definition at line 263 of file kbufferedsocket.cpp.

References KNetwork::KSocket\-Base::mutex().

Referenced by KBuffered\-Socket().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!outputBuffer@{outputBuffer}}
\index{outputBuffer@{outputBuffer}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIOBuffer\-Base} $\ast$ KBuffered\-Socket::output\-Buffer ()}\label{classKNetwork_1_1KBufferedSocket_a17}


Retrieves the output buffer object. 



Definition at line 277 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!bytesToWrite@{bytesToWrite}}
\index{bytesToWrite@{bytesToWrite}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-ULONG KBuffered\-Socket::bytes\-To\-Write () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a18}


Returns the length of the output buffer. 



Definition at line 282 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!closeNow@{closeNow}}
\index{closeNow@{closeNow}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::close\-Now ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KBufferedSocket_a19}


Closes the socket and discards any output data that had been buffered with {\bf write\-Block}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a10})} but that had not yet been written. 

\begin{Desc}
\item[See also:]{\bf close}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a3})} \end{Desc}


Definition at line 290 of file kbufferedsocket.cpp.

Referenced by close(), slot\-Read\-Activity(), slot\-Write\-Activity(), and $\sim$KBuffered\-Socket().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!canReadLine@{canReadLine}}
\index{canReadLine@{canReadLine}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KBuffered\-Socket::can\-Read\-Line () const}\label{classKNetwork_1_1KBufferedSocket_a20}


Returns true if a line can be read with {\bf read\-Line}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a21})}. 



Definition at line 295 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!readLine@{readLine}}
\index{readLine@{readLine}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KBuffered\-Socket::read\-Line ()}\label{classKNetwork_1_1KBufferedSocket_a21}


Reads a line of data from the socket buffers. 



Definition at line 303 of file kbufferedsocket.cpp.\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!stateChanging@{stateChanging}}
\index{stateChanging@{stateChanging}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::state\-Changing ({\bf Socket\-State} {\em new\-State})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKNetwork_1_1KBufferedSocket_b1}


Catch connection to clear the buffers. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_b2})}.

Definition at line 226 of file kbufferedsocket.cpp.

References KNetwork::KClient\-Socket\-Base::emits\-Ready\-Read(), KNetwork::KClient\-Socket\-Base::emits\-Ready\-Write(), enable\-Read(), and enable\-Write().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!slotReadActivity@{slotReadActivity}}
\index{slotReadActivity@{slotReadActivity}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::slot\-Read\-Activity ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKNetwork_1_1KBufferedSocket_j0}


Slot called when there's read activity. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_j0})}.

Definition at line 308 of file kbufferedsocket.cpp.

References close\-Now(), KNetwork::KClient\-Socket\-Base::copy\-Error(), KNetwork::KClient\-Socket\-Base::emits\-Ready\-Read(), KNetwork::KSocket\-Base::error(), KNetwork::KClient\-Socket\-Base::got\-Error(), QMutex::lock(), KNetwork::KSocket\-Base::mutex(), KNetwork::KClient\-Socket\-Base::ready\-Read(), KNetwork::KActive\-Socket\-Base::set\-Error(), QTimer::single\-Shot(), KNetwork::KSocket\-Base::socket\-Device(), KNetwork::KClient\-Socket\-Base::state(), and QMutex::unlock().

Referenced by enable\-Read(), and wait\-For\-More().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!slotWriteActivity@{slotWriteActivity}}
\index{slotWriteActivity@{slotWriteActivity}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KBuffered\-Socket::slot\-Write\-Activity ()\hspace{0.3cm}{\tt  [protected, virtual, slot]}}\label{classKNetwork_1_1KBufferedSocket_j1}


Slot called when there's write activity. 



Reimplemented from {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_j1})}.

Definition at line 355 of file kbufferedsocket.cpp.

References bytes\-Written(), close\-Now(), KNetwork::KClient\-Socket\-Base::copy\-Error(), KNetwork::KSocket\-Base::error(), KNetwork::KClient\-Socket\-Base::got\-Error(), QMutex::lock(), KNetwork::KSocket\-Base::mutex(), QSocket\-Notifier::set\-Enabled(), KNetwork::KActive\-Socket\-Base::set\-Error(), KNetwork::KSocket\-Base::socket\-Device(), KNetwork::KClient\-Socket\-Base::state(), QMutex::unlock(), and KNetwork::KSocket\-Device::write\-Notifier().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!bytesWritten@{bytesWritten}}
\index{bytesWritten@{bytesWritten}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KNetwork::KBuffered\-Socket::bytes\-Written (int {\em bytes})\hspace{0.3cm}{\tt  [signal]}}\label{classKNetwork_1_1KBufferedSocket_l0}


This signal is emitted whenever data is written. 



Referenced by slot\-Write\-Activity().\index{KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}!reset@{reset}}
\index{reset@{reset}!KNetwork::KBufferedSocket@{KNetwork::KBuffered\-Socket}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KNetwork::KBuffered\-Socket::reset ()\hspace{0.3cm}{\tt  [inline]}}\label{classKNetwork_1_1KBufferedSocket_a22}


\begin{Desc}
\item[{\bf Deprecated}]Closes the socket. \end{Desc}
This function is provided to ease porting from KExtended\-Socket, which required a call to {\bf reset()}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a22})} in order to be able to connect again using the same device. This is not necessary in {\bf KBuffered\-Socket}{\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket})} any more. 

Reimplemented from {\bf QIODevice}.

Definition at line 233 of file kbufferedsocket.h.

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