\section{KNetwork::KSocket\-Device Class Reference}
\label{classKNetwork_1_1KSocketDevice}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}
Low-level socket functionality.  


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

Inheritance diagram for KNetwork::KSocket\-Device:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=284pt]{classKNetwork_1_1KSocketDevice__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KNetwork::KSocket\-Device:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=183pt]{classKNetwork_1_1KSocketDevice__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Capabilities} \{ \par
{\bf Can\-Connect\-String} =  0x01, 
{\bf Can\-Bind\-String} =  0x02, 
{\bf Can\-Not\-Bind} =  0x04, 
{\bf Can\-Not\-Listen} =  0x08, 
\par
{\bf Can\-Multicast} =  0x10, 
{\bf Can\-Not\-Use\-Datagrams} =  0x20
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSocket\-Device} (const {\bf KSocket\-Base} $\ast$=0L)
\item 
{\bf KSocket\-Device} (int fd)
\item 
virtual {\bf $\sim$KSocket\-Device} ()
\item 
int {\bf socket} () const 
\item 
virtual int {\bf capabilities} () const 
\item 
virtual bool {\bf set\-Socket\-Options} (int opts)
\item 
virtual bool {\bf open} (int {\bf mode})
\item 
virtual void {\bf close} ()
\item 
virtual void {\bf flush} ()
\item 
virtual bool {\bf create} (int family, int type, int protocol)
\item 
bool {\bf create} (const {\bf KResolver\-Entry} \&address)
\item 
virtual bool {\bf bind} (const {\bf KResolver\-Entry} \&address)
\item 
virtual bool {\bf listen} (int backlog=5)
\item 
virtual bool {\bf connect} (const {\bf KResolver\-Entry} \&address)
\item 
virtual {\bf KSocket\-Device} $\ast$ {\bf accept} ()
\item 
virtual bool {\bf disconnect} ()
\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 {\bf KSocket\-Address} {\bf local\-Address} () const 
\item 
virtual {\bf KSocket\-Address} {\bf peer\-Address} () const 
\item 
virtual {\bf KSocket\-Address} {\bf external\-Address} () const 
\item 
{\bf QSocket\-Notifier} $\ast$ {\bf read\-Notifier} () const 
\item 
{\bf QSocket\-Notifier} $\ast$ {\bf write\-Notifier} () const 
\item 
{\bf QSocket\-Notifier} $\ast$ {\bf exception\-Notifier} () const 
\item 
virtual bool {\bf poll} (bool $\ast$input, bool $\ast$output, bool $\ast$exception=0L, int timeout=-1, bool $\ast$timedout=0L)
\item 
bool {\bf poll} (int timeout=-1, bool $\ast$timedout=0L)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf KSocket\-Device} $\ast$ {\bf create\-Default} ({\bf KSocket\-Base} $\ast$parent)
\item 
static {\bf KSocket\-Device} $\ast$ {\bf create\-Default} ({\bf KSocket\-Base} $\ast$parent, int capabilities)
\item 
static KSocket\-Device\-Factory\-Base $\ast$ {\bf set\-Default\-Impl} (KSocket\-Device\-Factory\-Base $\ast$factory)
\item 
static void {\bf add\-New\-Impl} (KSocket\-Device\-Factory\-Base $\ast$factory, int capabilities)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KSocket\-Device} (bool, const {\bf KSocket\-Base} $\ast$parent=0L)
\item 
virtual {\bf QSocket\-Notifier} $\ast$ {\bf create\-Notifier} (QSocket\-Notifier::Type type) const 
\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
int {\bf m\_\-sockfd}
\end{CompactItemize}


\subsection{Detailed Description}
Low-level socket functionality. 

This class provides low-level socket functionality.

Most users will prefer \char`\"{}cooked\char`\"{} interfaces like those of {\bf KStream\-Socket}{\rm (p.\,\pageref{classKNetwork_1_1KStreamSocket})} or {\bf KServer\-Socket}{\rm (p.\,\pageref{classKNetwork_1_1KServerSocket})}.

Descended classes from this one provide some other kinds of socket functionality, like proxying or specific socket types.

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




Definition at line 50 of file ksocketdevice.h.

\subsection{Member Enumeration Documentation}
\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!Capabilities@{Capabilities}}
\index{Capabilities@{Capabilities}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KNetwork::KSocket\-Device::Capabilities}}\label{classKNetwork_1_1KSocketDevice_w6}


Capabilities for the socket implementation. 

KSocket\-Device-derived classes can implement certain capabilities that are not available in the default class. These capabilities are described by these flags. The default {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})} class has none of these capabilities.

For the negative capabilities (inabilities, the Can\-Not$\ast$ forms), when a capability is not present, the implementation will default to the original behaviour. \begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{CanConnectString@{CanConnectString}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanConnectString@{CanConnectString}}\item[{\em 
Can\-Connect\-String\label{classKNetwork_1_1KSocketDevice_w6w0}
}]Can connect to hostnames. 

If this flag is present, the string form of {\bf connect}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a13})} can be used. \index{CanBindString@{CanBindString}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanBindString@{CanBindString}}\item[{\em 
Can\-Bind\-String\label{classKNetwork_1_1KSocketDevice_w6w1}
}]Can bind to hostnames. 

If this flag is present, the string form of {\bf bind}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a11})} can be used \index{CanNotBind@{CanNotBind}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanNotBind@{CanNotBind}}\item[{\em 
Can\-Not\-Bind\label{classKNetwork_1_1KSocketDevice_w6w2}
}]Can not bind. 

If this flag is present, this implementation cannot bind \index{CanNotListen@{CanNotListen}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanNotListen@{CanNotListen}}\item[{\em 
Can\-Not\-Listen\label{classKNetwork_1_1KSocketDevice_w6w3}
}]Can not listen. 

If this flag is present, this implementation cannot listen \index{CanMulticast@{CanMulticast}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanMulticast@{CanMulticast}}\item[{\em 
Can\-Multicast\label{classKNetwork_1_1KSocketDevice_w6w4}
}]Can send multicast as well as join/leave multicast groups. \index{CanNotUseDatagrams@{CanNotUseDatagrams}!KNetwork::KSocketDevice@{KNetwork::KSocketDevice}}\index{KNetwork::KSocketDevice@{KNetwork::KSocketDevice}!CanNotUseDatagrams@{CanNotUseDatagrams}}\item[{\em 
Can\-Not\-Use\-Datagrams\label{classKNetwork_1_1KSocketDevice_w6w5}
}]Can not use datagrams. 

Note that this implies multicast capability not being available either. \end{description}
\end{Desc}



Definition at line 63 of file ksocketdevice.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!KSocketDevice@{KSocketDevice}}
\index{KSocketDevice@{KSocketDevice}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSocket\-Device::KSocket\-Device (const {\bf KSocket\-Base} $\ast$ = {\tt 0L})\hspace{0.3cm}{\tt  [explicit]}}\label{classKNetwork_1_1KSocketDevice_a0}


Default constructor. 

The parameter is used to specify which socket this object is used as a device for. 

Definition at line 76 of file ksocketdevice.cpp.

References KNetwork::KSocket\-Base::set\-Socket\-Device(), and set\-Socket\-Options().

Referenced by accept(), and create\-Default().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!KSocketDevice@{KSocketDevice}}
\index{KSocketDevice@{KSocketDevice}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSocket\-Device::KSocket\-Device (int {\em fd})\hspace{0.3cm}{\tt  [explicit]}}\label{classKNetwork_1_1KSocketDevice_a1}


Constructs a new object around an already-open socket. 

Note: you should write programs that create sockets through the classes whenever possible. 

Definition at line 84 of file ksocketdevice.cpp.

References KNetwork::KSocket\-Base::set\-Socket\-Device().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!~KSocketDevice@{$\sim$KSocketDevice}}
\index{~KSocketDevice@{$\sim$KSocketDevice}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSocket\-Device::$\sim${\bf KSocket\-Device} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a2}


Destructor. 

This closes the socket if it's open. 

Definition at line 100 of file ksocketdevice.cpp.

References close().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!KSocketDevice@{KSocketDevice}}
\index{KSocketDevice@{KSocketDevice}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSocket\-Device::KSocket\-Device (bool, const {\bf KSocket\-Base} $\ast$ {\em parent} = {\tt 0L})\hspace{0.3cm}{\tt  [protected]}}\label{classKNetwork_1_1KSocketDevice_b0}


Special constructor. 

This constructor will cause the internal socket device NOT to be set. Use this if your socket device class takes another underlying socket device.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the parent, if any \end{description}
\end{Desc}


Definition at line 92 of file ksocketdevice.cpp.

References set\-Socket\-Options().

\subsection{Member Function Documentation}
\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!socket@{socket}}
\index{socket@{socket}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KNetwork::KSocket\-Device::socket () const\hspace{0.3cm}{\tt  [inline]}}\label{classKNetwork_1_1KSocketDevice_a3}


Returns the file descriptor for this socket. 



Definition at line 122 of file ksocketdevice.h.

References m\_\-sockfd.\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!capabilities@{capabilities}}
\index{capabilities@{capabilities}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual int KNetwork::KSocket\-Device::capabilities () const\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KSocketDevice_a4}


Returns the set of capabilities this socket class implements. 

The set of capabilities is defined as an OR-ed mask of {\bf Capabilities}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_w6})} bits.

The default implementation is guaranteed to always return 0. That is, derived implementations always return bits where they differ from the system standard sockets. 

Reimplemented in {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a3})}, {\bf KNetwork::KMulticast\-Socket\-Impl} {\rm (p.\,\pageref{classKNetwork_1_1KMulticastSocketImpl_a2})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a3})}.

Definition at line 134 of file ksocketdevice.h.\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!setSocketOptions@{setSocketOptions}}
\index{setSocketOptions@{setSocketOptions}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::set\-Socket\-Options (int {\em opts})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a5}


This implementation sets the options on the socket. 



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

Definition at line 107 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KSocket\-Base::mutex(), and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by create(), KSocket\-Device(), KNetwork::KServer\-Socket::set\-Socket\-Options(), and KNetwork::KClient\-Socket\-Base::set\-Socket\-Options().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!open@{open}}
\index{open@{open}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::open (int {\em mode})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a6}


Reimplementation from {\bf QIODevice}. 

You should not call this function in sockets. 

Reimplemented from {\bf QIODevice}.

Definition at line 171 of file ksocketdevice.cpp.

References KNetwork::KActive\-Socket\-Base::reset\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!close@{close}}
\index{close@{close}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSocket\-Device::close ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a7}


Closes the socket. 

Reimplemented from {\bf QIODevice}.

Use this function to close the socket this object is holding open. 

Implements {\bf KNetwork::KPassive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KPassiveSocketBase_a4})}.

Reimplemented in {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a6})}.

Definition at line 177 of file ksocketdevice.cpp.

References m\_\-sockfd, and KNetwork::KActive\-Socket\-Base::reset\-Error().

Referenced by KNetwork::KServer\-Socket::close(), KNetwork::KClient\-Socket\-Base::close(), and $\sim$KSocket\-Device().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!flush@{flush}}
\index{flush@{flush}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KNetwork::KSocket\-Device::flush ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKNetwork_1_1KSocketDevice_a8}


This call is not supported on sockets. 

Reimplemented from {\bf QIODevice}. 

Reimplemented from {\bf QIODevice}.

Definition at line 157 of file ksocketdevice.h.\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!create@{create}}
\index{create@{create}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::create (int {\em family}, int {\em type}, int {\em protocol})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a9}


Creates a socket but don't connect or bind anywhere. 

This function is the equivalent of the system call socket(2). 

Reimplemented in {\bf KNetwork::KMulticast\-Socket\-Impl} {\rm (p.\,\pageref{classKNetwork_1_1KMulticastSocketImpl_a3})}.

Definition at line 195 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), KNetwork::KActive\-Socket\-Base::set\-Error(), set\-Socket\-Options(), and KNetwork::KSocket\-Base::socket\-Options().

Referenced by KNetwork::KSocks\-Socket\-Device::bind(), bind(), KNetwork::KSocks\-Socket\-Device::connect(), connect(), create(), and create\-Default().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!create@{create}}
\index{create@{create}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::create (const {\bf KResolver\-Entry} \& {\em address})}\label{classKNetwork_1_1KSocketDevice_a10}


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

Creates a socket but don't connect or bind anywhere. 

Definition at line 220 of file ksocketdevice.cpp.

References create().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!bind@{bind}}
\index{bind@{bind}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::bind (const {\bf KResolver\-Entry} \& {\em address})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a11}


Binds this socket to the given address. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a2})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a4})}.

Definition at line 225 of file ksocketdevice.cpp.

References create(), m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!listen@{listen}}
\index{listen@{listen}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::listen (int {\em backlog} = {\tt 5})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a12}


Puts this socket into listening mode. 



Implements {\bf KNetwork::KPassive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KPassiveSocketBase_a3})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a5})}.

Definition at line 248 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!connect@{connect}}
\index{connect@{connect}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::connect (const {\bf KResolver\-Entry} \& {\em address})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a13}


Connect to a remote host. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a3})}.

Reimplemented in {\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})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a6})}.

Definition at line 270 of file ksocketdevice.cpp.

References create(), m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by KNetwork::KClient\-Socket\-Base::connect().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!accept@{accept}}
\index{accept@{accept}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Device} $\ast$ KSocket\-Device::accept ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a14}


Accepts a new incoming connection. 

Note: this function returns a socket of type {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})}. 

Implements {\bf KNetwork::KPassive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KPassiveSocketBase_a5})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a7})}.

Definition at line 304 of file ksocketdevice.cpp.

References KSocket\-Device(), m\_\-sockfd, and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by KNetwork::KServer\-Socket::accept().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!disconnect@{disconnect}}
\index{disconnect@{disconnect}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::disconnect ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a15}


Disconnects this socket. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a4})}.

Definition at line 328 of file ksocketdevice.cpp.

References KNetwork::KSocket\-Address::address(), KNetwork::KSocket\-Address::length(), m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), KNetwork::KActive\-Socket\-Base::set\-Error(), and KNetwork::KSocket\-Address::set\-Family().

Referenced by KNetwork::KClient\-Socket\-Base::disconnect().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!bytesAvailable@{bytesAvailable}}
\index{bytesAvailable@{bytesAvailable}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::bytes\-Available () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a16}


Returns the number of bytes available for reading without blocking. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a9})}.

Definition at line 362 of file ksocketdevice.cpp.

References m\_\-sockfd.

Referenced by KNetwork::KClient\-Socket\-Base::bytes\-Available(), and wait\-For\-More().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!waitForMore@{waitForMore}}
\index{waitForMore@{waitForMore}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::wait\-For\-More (int {\em msecs}, bool $\ast$ {\em timeout} = {\tt 0L})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a17}


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

This function is a wrapper against {\bf poll}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a30})}. This function will wait for any read events. 

Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a10})}.

Definition at line 374 of file ksocketdevice.cpp.

References bytes\-Available(), m\_\-sockfd, and poll().

Referenced by KNetwork::KDatagram\-Socket::receive(), and KNetwork::KClient\-Socket\-Base::wait\-For\-More().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!readBlock@{readBlock}}
\index{readBlock@{readBlock}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::read\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a18}


Reads data from this socket. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a11})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a8})}.

Definition at line 412 of file ksocketdevice.cpp.

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


Reads data and the source address from this socket. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a12})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a9})}.

Definition at line 433 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!peekBlock@{peekBlock}}
\index{peekBlock@{peekBlock}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::peek\-Block (char $\ast$ {\em data}, Q\_\-ULONG {\em maxlen})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a20}


Peeks data in the socket. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a13})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a10})}.

Definition at line 454 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().

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


Peeks the data in the socket and the source address. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a14})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a11})}.

Definition at line 475 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!writeBlock@{writeBlock}}
\index{writeBlock@{writeBlock}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::write\-Block (const char $\ast$ {\em data}, Q\_\-ULONG {\em len})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a22}


Writes data to the socket. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a15})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a12})}.

Definition at line 496 of file ksocketdevice.cpp.

Referenced by KNetwork::KClient\-Socket\-Base::write\-Block().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!writeBlock@{writeBlock}}
\index{writeBlock@{writeBlock}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-LONG KSocket\-Device::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_1KSocketDevice_a23}


Writes the given data to the given destination address. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a16})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a13})}.

Definition at line 501 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!localAddress@{localAddress}}
\index{localAddress@{localAddress}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KSocket\-Device::local\-Address () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a24}


Returns this socket's local address. 



Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a20})}.

Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a14})}.

Definition at line 525 of file ksocketdevice.cpp.

References KNetwork::KSocket\-Address::address(), KNetwork::KSocket\-Address::length(), local\-Address(), m\_\-sockfd, and KNetwork::KSocket\-Address::set\-Length().

Referenced by external\-Address(), local\-Address(), KNetwork::KServer\-Socket::local\-Address(), and KNetwork::KClient\-Socket\-Base::local\-Address().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!peerAddress@{peerAddress}}
\index{peerAddress@{peerAddress}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KSocket\-Device::peer\-Address () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a25}


Returns this socket's peer address. 

If this implementation does proxying of some sort, this is the real external address, not the proxy's address. 

Implements {\bf KNetwork::KActive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KActiveSocketBase_a21})}.

Reimplemented in {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a9})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a15})}.

Definition at line 554 of file ksocketdevice.cpp.

References KNetwork::KSocket\-Address::address(), KNetwork::KSocket\-Address::length(), m\_\-sockfd, peer\-Address(), and KNetwork::KSocket\-Address::set\-Length().

Referenced by peer\-Address(), and KNetwork::KClient\-Socket\-Base::peer\-Address().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!externalAddress@{externalAddress}}
\index{externalAddress@{externalAddress}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KSocket\-Device::external\-Address () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a26}


Returns this socket's externally visible local address. 

If this socket has a local address visible externally different from the normal local address (as returned by {\bf local\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a24})}), then return it.

Certain implementations will use proxies and thus have externally visible addresses different from the local socket values. The default implementation returns the same value as {\bf local\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a24})}.

\begin{Desc}
\item[Note:]This function may return an empty {\bf KSocket\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketAddress})}. In that case, the externally visible address could/can not be determined. \end{Desc}


Implements {\bf KNetwork::KPassive\-Socket\-Base} {\rm (p.\,\pageref{classKNetwork_1_1KPassiveSocketBase_a7})}.

Reimplemented in {\bf KNetwork::KHttp\-Proxy\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KHttpProxySocketDevice_a10})}, and {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a16})}.

Definition at line 583 of file ksocketdevice.cpp.

References local\-Address().

Referenced by KNetwork::KServer\-Socket::external\-Address().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!readNotifier@{readNotifier}}
\index{readNotifier@{readNotifier}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSocket\-Notifier} $\ast$ KSocket\-Device::read\-Notifier () const}\label{classKNetwork_1_1KSocketDevice_a27}


Returns a socket notifier for input on this socket. 

The notifier is created only when requested. Whether it is enabled or not depends on the implementation.

This function might return NULL. 

Definition at line 590 of file ksocketdevice.cpp.

References create\-Notifier(), m\_\-sockfd, and KNetwork::KSocket\-Base::mutex().

Referenced by KNetwork::KBuffered\-Socket::close(), KNetwork::KClient\-Socket\-Base::enable\-Read(), KNetwork::KBuffered\-Socket::enable\-Read(), and KNetwork::KClient\-Socket\-Base::state\-Changing().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!writeNotifier@{writeNotifier}}
\index{writeNotifier@{writeNotifier}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSocket\-Notifier} $\ast$ KSocket\-Device::write\-Notifier () const}\label{classKNetwork_1_1KSocketDevice_a28}


Returns a socket notifier for output on this socket. 

The is created only when requested.

This function might return NULL. 

Definition at line 608 of file ksocketdevice.cpp.

References create\-Notifier(), m\_\-sockfd, and KNetwork::KSocket\-Base::mutex().

Referenced by KNetwork::KClient\-Socket\-Base::enable\-Write(), KNetwork::KBuffered\-Socket::enable\-Write(), KNetwork::KBuffered\-Socket::slot\-Write\-Activity(), KNetwork::KClient\-Socket\-Base::state\-Changing(), and KNetwork::KBuffered\-Socket::write\-Block().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!exceptionNotifier@{exceptionNotifier}}
\index{exceptionNotifier@{exceptionNotifier}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSocket\-Notifier} $\ast$ KSocket\-Device::exception\-Notifier () const}\label{classKNetwork_1_1KSocketDevice_a29}


Returns a socket notifier for exceptional events on this socket. 

The is created only when requested.

This function might return NULL. 

Definition at line 626 of file ksocketdevice.cpp.

References create\-Notifier(), m\_\-sockfd, and KNetwork::KSocket\-Base::mutex().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!poll@{poll}}
\index{poll@{poll}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::poll (bool $\ast$ {\em input}, bool $\ast$ {\em output}, bool $\ast$ {\em exception} = {\tt 0L}, int {\em timeout} = {\tt -1}, bool $\ast$ {\em timedout} = {\tt 0L})\hspace{0.3cm}{\tt  [virtual]}}\label{classKNetwork_1_1KSocketDevice_a30}


Executes a poll in the socket, via select(2) or poll(2). 

The events polled are returned in the parameters pointers. Set any of them to NULL to disable polling of that event.

On exit, {\tt input}, {\tt output} and {\tt exception} will contain true if an event of that kind is waiting on the socket or false if not. If a timeout occurred, set {\tt timedout} to true (all other parameters are necessarily set to false).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em input}]if set, turns on polling for input events \item[{\em output}]if set, turns on polling for output events \item[{\em exception}]if set, turns on polling for exceptional events \item[{\em timeout}]the time in milliseconds to wait for an event; 0 for no wait and any negative value to wait forever \item[{\em timedout}]on exit, will contain true if the polling timed out \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the poll call succeeded and false if an error occurred \end{Desc}


Reimplemented in {\bf KNetwork::KSocks\-Socket\-Device} {\rm (p.\,\pageref{classKNetwork_1_1KSocksSocketDevice_a17})}.

Definition at line 644 of file ksocketdevice.cpp.

References m\_\-sockfd, KNetwork::KActive\-Socket\-Base::reset\-Error(), and KNetwork::KActive\-Socket\-Base::set\-Error().

Referenced by KNetwork::KStream\-Socket::connect(), poll(), and wait\-For\-More().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!poll@{poll}}
\index{poll@{poll}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KSocket\-Device::poll (int {\em timeout} = {\tt -1}, bool $\ast$ {\em timedout} = {\tt 0L})}\label{classKNetwork_1_1KSocketDevice_a31}


Shorter version to poll for any events in a socket. 

This call polls for input, output and exceptional events in a socket but does not return their states. This is useful if you need to wait for any event, but don't need to know which; or for timeouts.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em timeout}]the time in milliseconds to wait for an event; 0 for no wait and any negative value to wait forever \item[{\em timedout}]on exit, will contain true if the polling timed out \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the poll call succeeded and false if an error occurred \end{Desc}


Definition at line 766 of file ksocketdevice.cpp.

References poll().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!createNotifier@{createNotifier}}
\index{createNotifier@{createNotifier}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QSocket\-Notifier} $\ast$ KSocket\-Device::create\-Notifier (QSocket\-Notifier::Type {\em type}) const\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKNetwork_1_1KSocketDevice_b1}


Creates a socket notifier of the given type. 

This function is called by {\bf read\-Notifier}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a27})}, {\bf write\-Notifier}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a28})} and {\bf exception\-Notifier}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a29})} when they need to create a socket notifier (i.e., the first call to those functions after the socket is open). After that call, those functions cache the socket notifier and will not need to call this function again.

Reimplement this function in your derived class if your socket type requires a different kind of {\bf QSocket\-Notifier}. The return value should be deleteable with delete. ({\bf close}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice_a7})} deletes them).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]the socket notifier type \end{description}
\end{Desc}


Definition at line 772 of file ksocketdevice.cpp.

References m\_\-sockfd.

Referenced by exception\-Notifier(), read\-Notifier(), and write\-Notifier().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!createDefault@{createDefault}}
\index{createDefault@{createDefault}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Device} $\ast$ KSocket\-Device::create\-Default ({\bf KSocket\-Base} $\ast$ {\em parent})\hspace{0.3cm}{\tt  [static]}}\label{classKNetwork_1_1KSocketDevice_e0}


Creates a new default {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})} object given the parent object. 

The capabilities flag indicates the desired capabilities the object being created should possess. Those capabilities are not guaranteed: if no factory can provide such an object, a default object will be created.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the {\bf KSocket\-Base}{\rm (p.\,\pageref{classKNetwork_1_1KSocketBase})} parent \end{description}
\end{Desc}


Definition at line 820 of file ksocketdevice.cpp.

References create(), and KSocket\-Device().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!createDefault@{createDefault}}
\index{createDefault@{createDefault}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Device} $\ast$ KSocket\-Device::create\-Default ({\bf KSocket\-Base} $\ast$ {\em parent}, int {\em capabilities})\hspace{0.3cm}{\tt  [static]}}\label{classKNetwork_1_1KSocketDevice_e1}


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

This will create an object only if the requested capabilities match.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em parent}]the parent \item[{\em capabilities}]the requested capabilities \end{description}
\end{Desc}


Definition at line 835 of file ksocketdevice.cpp.

References QMap::const\-Begin(), and QMap::const\-End().\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!setDefaultImpl@{setDefaultImpl}}
\index{setDefaultImpl@{setDefaultImpl}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSocket\-Device\-Factory\-Base $\ast$ KSocket\-Device::set\-Default\-Impl (KSocket\-Device\-Factory\-Base $\ast$ {\em factory})\hspace{0.3cm}{\tt  [static]}}\label{classKNetwork_1_1KSocketDevice_e2}


Sets the default {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})} implementation to use and return the old factory. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em factory}]the factory object for the implementation \end{description}
\end{Desc}


Definition at line 852 of file ksocketdevice.cpp.\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!addNewImpl@{addNewImpl}}
\index{addNewImpl@{addNewImpl}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSocket\-Device::add\-New\-Impl (KSocket\-Device\-Factory\-Base $\ast$ {\em factory}, int {\em capabilities})\hspace{0.3cm}{\tt  [static]}}\label{classKNetwork_1_1KSocketDevice_e3}


Adds a factory of {\bf KSocket\-Device}{\rm (p.\,\pageref{classKNetwork_1_1KSocketDevice})} objects to the list, along with its capabilities flag. 



Definition at line 860 of file ksocketdevice.cpp.

References QMap::contains(), and QMap::insert().

\subsection{Member Data Documentation}
\index{KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}!m_sockfd@{m\_\-sockfd}}
\index{m_sockfd@{m\_\-sockfd}!KNetwork::KSocketDevice@{KNetwork::KSocket\-Device}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int {\bf KNetwork::KSocket\-Device::m\_\-sockfd}\hspace{0.3cm}{\tt  [protected]}}\label{classKNetwork_1_1KSocketDevice_p0}


The socket file descriptor. 

It is used throughout the implementation and subclasses. 

Definition at line 95 of file ksocketdevice.h.

Referenced by accept(), bind(), bytes\-Available(), close(), connect(), create(), create\-Notifier(), disconnect(), exception\-Notifier(), listen(), local\-Address(), peek\-Block(), peer\-Address(), poll(), read\-Block(), read\-Notifier(), set\-Socket\-Options(), socket(), wait\-For\-More(), write\-Block(), and write\-Notifier().

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