\section{KNetwork::KActive\-Socket\-Base Class Reference}
\label{classKNetwork_1_1KActiveSocketBase}\index{KNetwork::KActiveSocketBase@{KNetwork::KActiveSocketBase}}
Abstract class for active sockets.  


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

Inheritance diagram for KNetwork::KActive\-Socket\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=168pt]{classKNetwork_1_1KActiveSocketBase__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNetwork::KActive\-Socket\-Base:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=121pt]{classKNetwork_1_1KActiveSocketBase__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KActive\-Socket\-Base} ()
\item 
virtual {\bf $\sim$KActive\-Socket\-Base} ()
\item 
virtual bool {\bf bind} (const {\bf KResolver\-Entry} \&address)=0
\item 
virtual bool {\bf connect} (const {\bf KResolver\-Entry} \&address)=0
\item 
virtual bool {\bf disconnect} ()=0
\item 
virtual {\bf Offset} {\bf size} () const 
\item 
virtual {\bf Offset} {\bf at} () const 
\item 
virtual bool {\bf at} ({\bf Offset})
\item 
virtual bool {\bf at\-End} () const 
\item 
virtual Q\_\-LONG {\bf bytes\-Available} () const =0
\item 
virtual Q\_\-LONG {\bf wait\-For\-More} (int msecs, bool $\ast$timeout=0L)=0
\item 
virtual Q\_\-LONG {\bf read\-Block} (char $\ast$data, Q\_\-ULONG len)=0
\item 
virtual Q\_\-LONG {\bf read\-Block} (char $\ast$data, Q\_\-ULONG maxlen, {\bf KSocket\-Address} \&from)=0
\item 
virtual Q\_\-LONG {\bf peek\-Block} (char $\ast$data, Q\_\-ULONG maxlen)=0
\item 
virtual Q\_\-LONG {\bf peek\-Block} (char $\ast$data, Q\_\-ULONG maxlen, {\bf KSocket\-Address} \&from)=0
\item 
virtual Q\_\-LONG {\bf write\-Block} (const char $\ast$data, Q\_\-ULONG len)=0
\item 
virtual Q\_\-LONG {\bf write\-Block} (const char $\ast$data, Q\_\-ULONG len, const {\bf KSocket\-Address} \&to)=0
\item 
virtual int {\bf getch} ()
\item 
virtual int {\bf putch} (int ch)
\item 
virtual int {\bf ungetch} (int)
\item 
virtual {\bf KSocket\-Address} {\bf local\-Address} () const =0
\item 
virtual {\bf KSocket\-Address} {\bf peer\-Address} () const =0
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf set\-Error} (int {\bf status}, {\bf Socket\-Error} error)
\item 
void {\bf reset\-Error} ()
\end{CompactItemize}


\subsection{Detailed Description}
Abstract class for active sockets. 

This class provides the standard interfaces for active sockets, i.e., sockets that are used to connect to external addresses.

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




Definition at line 443 of file ksocketbase.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!KActiveSocketBase@{KActiveSocketBase}}
\index{KActiveSocketBase@{KActiveSocketBase}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KActive\-Socket\-Base::KActive\-Socket\-Base ()}\label{classKNetwork_1_1KActiveSocketBase_a0}


Constructor. 



Definition at line 283 of file ksocketbase.cpp.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!~KActiveSocketBase@{$\sim$KActiveSocketBase}}
\index{~KActiveSocketBase@{$\sim$KActiveSocketBase}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KActive\-Socket\-Base::$\sim${\bf KActive\-Socket\-Base} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a1}


Destructor. 



Definition at line 287 of file ksocketbase.cpp.

\subsection{Member Function Documentation}
\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!bind@{bind}}
\index{bind@{bind}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KNetwork::KActive\-Socket\-Base::bind (const {\bf KResolver\-Entry} \& {\em address})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a2}


Binds this socket to the given address. 

The socket will be constructed with the address family, socket type and protocol as those given in the {\tt address} object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]the address to bind to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the binding was successful, false otherwise \end{Desc}


Implemented in {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a11})}, {\bf KNetwork::KDatagram\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KDatagramSocket_a3})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a11})}, {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a4})}, and {\bf KNetwork::KStream\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KStreamSocket_a6})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!connect@{connect}}
\index{connect@{connect}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KNetwork::KActive\-Socket\-Base::connect (const {\bf KResolver\-Entry} \& {\em address})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a3}


Connect to a remote host. 

This will make this socket try to connect to the remote host. If the socket is not yet created, it will be created using the address family, socket type and protocol specified in the {\tt address} object.

If this function returns with error In\-Progress, calling it again with the same address after a time will cause it to test if the connection has succeeded in the mean time.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]the address to connect to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the connection was successful or has been successfully queued; false if an error occurred. \end{Desc}


Implemented in {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a13})}, {\bf KNetwork::KDatagram\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KDatagramSocket_a5})}, {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a7})}, {\bf KNetwork::KMulticast\-Socket\-Impl} {\rm (p.\,\pageref{classKNetwork_1_1KMulticastSocketImpl_a4})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a13})}, {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a6})}, and {\bf KNetwork::KStream\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KStreamSocket_a8})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KNetwork::KActive\-Socket\-Base::disconnect ()\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a4}


Disconnects this socket from a connection, if possible. 

If this socket was connected to an endpoint, the connection is severed, but the socket is not closed. If the socket wasn't connected, this function does nothing.

If the socket hadn't yet been created, this function does nothing either.

Not all socket types can disconnect. Most notably, only connectionless datagram protocols such as UDP support this operation.

\begin{Desc}
\item[Returns:]true if the socket is now disconnected or false on error. \end{Desc}


Implemented in {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a15})}, and {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a15})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!size@{size}}
\index{size@{size}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf Offset} KNetwork::KActive\-Socket\-Base::size () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a5}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. This will always return 0. 

Reimplemented from {\bf QIODevice}.

Definition at line 507 of file ksocketbase.h.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!at@{at}}
\index{at@{at}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf Offset} KNetwork::KActive\-Socket\-Base::at () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a6}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. This will always return 0. 

Reimplemented from {\bf QIODevice}.

Definition at line 514 of file ksocketbase.h.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!at@{at}}
\index{at@{at}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KNetwork::KActive\-Socket\-Base::at ({\bf Offset})\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a7}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. This will always return false. 

Reimplemented from {\bf QIODevice}.

Definition at line 521 of file ksocketbase.h.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!atEnd@{atEnd}}
\index{atEnd@{atEnd}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KNetwork::KActive\-Socket\-Base::at\-End () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a8}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. This will always return true. 

Reimplemented from {\bf QIODevice}.

Definition at line 528 of file ksocketbase.h.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!bytesAvailable@{bytesAvailable}}
\index{bytesAvailable@{bytesAvailable}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::bytes\-Available () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a9}


Returns the number of bytes available for reading without blocking. 



Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a4})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a19})}, and {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a16})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!waitForMore@{waitForMore}}
\index{waitForMore@{waitForMore}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::wait\-For\-More (int {\em msecs}, bool $\ast$ {\em timeout} = {\tt 0L})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a10}


Waits up to {\tt msecs} for more data to be available on this socket. 

If msecs is -1, this call will block indefinetely until more data is indeed available; if it's 0, this function returns immediately.

If {\tt timeout} is not NULL, this function will set it to indicate if a timeout occurred.

\begin{Desc}
\item[Returns:]the number of bytes available \end{Desc}


Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a5})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a20})}, and {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a17})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!readBlock@{readBlock}}
\index{readBlock@{readBlock}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::read\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em len})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a11}


Reads data from the socket. 

Reimplemented from {\bf QIODevice}. See {\bf QIODevice::read\-Block} for more information. 

Reimplemented from {\bf QIODevice}.

Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a6})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a21})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a18})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a8})}.

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


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

Receives data and the source address.

This call will read data in the socket and will also place the sender's address in {\tt from} object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]where to write the read data to \item[{\em maxlen}]the maximum number of bytes to read \item[{\em from}]the address of the sender will be stored here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual number of bytes read \end{Desc}


Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a7})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a22})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a19})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a9})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!peekBlock@{peekBlock}}
\index{peekBlock@{peekBlock}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::peek\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a13}


Peeks the data in the socket. 

This call will allow you to peek the data to be received without actually receiving it -- that is, it will be available for further peekings and for the next read call.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]where to write the peeked data to \item[{\em maxlen}]the maximum number of bytes to peek \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual number of bytes copied into {\tt data} \end{Desc}


Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a8})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a23})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a20})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a10})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!peekBlock@{peekBlock}}
\index{peekBlock@{peekBlock}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::peek\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen}, {\bf KSocket\-Address} \& {\em from})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a14}


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

Peeks the data in the socket and the source address.

This call will allow you to peek the data to be received without actually receiving it -- that is, it will be available for further peekings and for the next read call.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]where to write the peeked data to \item[{\em maxlen}]the maximum number of bytes to peek \item[{\em from}]the address of the sender will be stored here \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the actual number of bytes copied into {\tt data} \end{Desc}


Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a9})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a24})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a21})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a11})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!writeBlock@{writeBlock}}
\index{writeBlock@{writeBlock}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual Q\_\-LONG KNetwork::KActive\-Socket\-Base::write\-Block (const char $\ast$ {\em data}, Q\_\-ULONG {\em len})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a15}


Writes the given data to the socket. 

Reimplemented from {\bf QIODevice}. See {\bf QIODevice::write\-Block} for more information. 

Reimplemented from {\bf QIODevice}.

Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a10})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a25})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a22})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a12})}.

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


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

Writes the given data to the destination address.

Note that not all socket connections allow sending data to different addresses than the one the socket is connected to.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]the data to write \item[{\em len}]the length of the data \item[{\em to}]the address to send to \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the number of bytes actually sent \end{Desc}


Implemented in {\bf KNetwork::KBuffered\-Socket} {\rm (p.\,\pageref{classKNetwork_1_1KBufferedSocket_a11})}, {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a26})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a23})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a13})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!getch@{getch}}
\index{getch@{getch}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KActive\-Socket\-Base::getch ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a17}


Reads one character from the socket. 

Reimplementation from {\bf QIODevice}. See {\bf QIODevice::getch} for more information. 

Reimplemented from {\bf QIODevice}.

Definition at line 291 of file ksocketbase.cpp.

References read\-Block().\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!putch@{putch}}
\index{putch@{putch}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KActive\-Socket\-Base::putch (int {\em ch})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a18}


Writes one character to the socket. 

Reimplementation from {\bf QIODevice}. See {\bf QIODevice::putch} for more information. 

Reimplemented from {\bf QIODevice}.

Definition at line 300 of file ksocketbase.cpp.

References write\-Block().\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!ungetch@{ungetch}}
\index{ungetch@{ungetch}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KNetwork::KActive\-Socket\-Base::ungetch (int)\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a19}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. This will always return -1; 

Reimplemented from {\bf QIODevice}.

Definition at line 635 of file ksocketbase.h.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!localAddress@{localAddress}}
\index{localAddress@{localAddress}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf KSocket\-Address} KNetwork::KActive\-Socket\-Base::local\-Address () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a20}


Returns this socket's local address. 



Implemented in {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a27})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a24})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a14})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!peerAddress@{peerAddress}}
\index{peerAddress@{peerAddress}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf KSocket\-Address} KNetwork::KActive\-Socket\-Base::peer\-Address () const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKNetwork_1_1KActiveSocketBase_a21}


Return this socket's peer address, if we are connected. 

If the address cannot be retrieved, the returned object will contain an invalid address. 

Implemented in {\bf KNetwork::KClient\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KClientSocketBase_a28})}, {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a9})}, {\bf KNetwork::KSocket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a25})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a15})}.\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!setError@{setError}}
\index{setError@{setError}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KActive\-Socket\-Base::set\-Error (int {\em status}, {\bf Socket\-Error} {\em error})\hspace{0.3cm}{\tt  [protected]}}\label{classKNetwork_1_1KActiveSocketBase_b0}


Sets the socket's error code and the I/O Device's status. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em status}]the I/O Device status \item[{\em error}]the error code \end{description}
\end{Desc}


Definition at line 309 of file ksocketbase.cpp.

Referenced by KNetwork::KSocks\-Socket\-Device::accept(), KNetwork::KSocket\-Device::accept(), KNetwork::KSocks\-Socket\-Device::bind(), KNetwork::KSocket\-Device::bind(), KNetwork::KStream\-Socket::connect(), KNetwork::KSocks\-Socket\-Device::connect(), KNetwork::KSocket\-Device::connect(), KNetwork::KHttp\-Proxy\-Socket\-Device::connect(), KNetwork::KClient\-Socket\-Base::copy\-Error(), KNetwork::KSocket\-Device::create(), KNetwork::KSocket\-Device::disconnect(), KNetwork::KSocks\-Socket\-Device::listen(), KNetwork::KSocket\-Device::listen(), KNetwork::KSocks\-Socket\-Device::peek\-Block(), KNetwork::KSocket\-Device::peek\-Block(), KNetwork::KBuffered\-Socket::peek\-Block(), KNetwork::KSocks\-Socket\-Device::poll(), KNetwork::KSocket\-Device::poll(), KNetwork::KSocks\-Socket\-Device::read\-Block(), KNetwork::KSocket\-Device::read\-Block(), KNetwork::KBuffered\-Socket::read\-Block(), KNetwork::KDatagram\-Socket::receive(), KNetwork::KSocket\-Device::set\-Socket\-Options(), KNetwork::KBuffered\-Socket::slot\-Read\-Activity(), KNetwork::KBuffered\-Socket::slot\-Write\-Activity(), KNetwork::KSocks\-Socket\-Device::write\-Block(), KNetwork::KSocket\-Device::write\-Block(), and KNetwork::KBuffered\-Socket::write\-Block().\index{KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}!resetError@{resetError}}
\index{resetError@{resetError}!KNetwork::KActiveSocketBase@{KNetwork::KActive\-Socket\-Base}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KActive\-Socket\-Base::reset\-Error ()\hspace{0.3cm}{\tt  [protected]}}\label{classKNetwork_1_1KActiveSocketBase_b1}


Resets the socket error code and the I/O Device's status. 



Definition at line 315 of file ksocketbase.cpp.

References QIODevice::reset\-Status().

Referenced by KNetwork::KSocks\-Socket\-Device::bind(), KNetwork::KSocket\-Device::bind(), KNetwork::KClient\-Socket\-Base::bind(), KNetwork::KSocket\-Device::close(), KNetwork::KSocks\-Socket\-Device::connect(), KNetwork::KSocket\-Device::connect(), KNetwork::KHttp\-Proxy\-Socket\-Device::connect(), KNetwork::KSocket\-Device::create(), KNetwork::KSocket\-Device::disconnect(), KNetwork::KSocks\-Socket\-Device::listen(), KNetwork::KSocket\-Device::listen(), KNetwork::KSocket\-Device::open(), KNetwork::KSocks\-Socket\-Device::peek\-Block(), KNetwork::KSocket\-Device::peek\-Block(), KNetwork::KClient\-Socket\-Base::peek\-Block(), KNetwork::KBuffered\-Socket::peek\-Block(), KNetwork::KSocks\-Socket\-Device::poll(), KNetwork::KSocket\-Device::poll(), KNetwork::KSocks\-Socket\-Device::read\-Block(), KNetwork::KSocket\-Device::read\-Block(), KNetwork::KClient\-Socket\-Base::read\-Block(), KNetwork::KBuffered\-Socket::read\-Block(), KNetwork::KClient\-Socket\-Base::wait\-For\-More(), KNetwork::KBuffered\-Socket::wait\-For\-More(), KNetwork::KSocks\-Socket\-Device::write\-Block(), KNetwork::KSocket\-Device::write\-Block(), KNetwork::KClient\-Socket\-Base::write\-Block(), and KNetwork::KBuffered\-Socket::write\-Block().

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