\section{KNetwork::KResolver\-Entry Class Reference}
\label{classKNetwork_1_1KResolverEntry}\index{KNetwork::KResolverEntry@{KNetwork::KResolverEntry}}
One resolution entry.  


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

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KResolver\-Entry} ()
\item 
{\bf KResolver\-Entry} (const {\bf KSocket\-Address} \&addr, int socktype, int protocol, const {\bf QString} \&canon\-Name=QString::null, const {\bf QCString} \&encoded\-Name={\bf QCString}())
\item 
{\bf KResolver\-Entry} (const struct sockaddr $\ast$sa, Q\_\-UINT16 salen, int socktype, int protocol, const {\bf QString} \&canon\-Name=QString::null, const {\bf QCString} \&encoded\-Name={\bf QCString}())
\item 
{\bf KResolver\-Entry} (const {\bf KResolver\-Entry} \&other)
\item 
{\bf $\sim$KResolver\-Entry} ()
\item 
{\bf KSocket\-Address} {\bf address} () const 
\item 
Q\_\-UINT16 {\bf length} () const 
\item 
int {\bf family} () const 
\item 
{\bf QString} {\bf canonical\-Name} () const 
\item 
{\bf QCString} {\bf encoded\-Name} () const 
\item 
int {\bf socket\-Type} () const 
\item 
int {\bf protocol} () const 
\item 
{\bf KResolver\-Entry} \& {\bf operator=} (const {\bf KResolver\-Entry} \&other)
\end{CompactItemize}


\subsection{Detailed Description}
One resolution entry. 

This class is one element in the resolution results list. It contains the socket address for connecting, as well as a bit more of information: the socket type, address family and protocol numbers.

This class contains all the information required for creating, binding and connecting a socket.

{\bf KResolver\-Entry}{\rm (p.\,\pageref{classKNetwork_1_1KResolverEntry})} objects implicitly share data, so copying them is quite efficient.

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




Definition at line 66 of file kresolver.h.

\subsection{Constructor \& Destructor Documentation}
\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!KResolverEntry@{KResolverEntry}}
\index{KResolverEntry@{KResolverEntry}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KResolver\-Entry::KResolver\-Entry ()}\label{classKNetwork_1_1KResolverEntry_a0}


Default constructor. 



Definition at line 88 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!KResolverEntry@{KResolverEntry}}
\index{KResolverEntry@{KResolverEntry}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KResolver\-Entry::KResolver\-Entry (const {\bf KSocket\-Address} \& {\em addr}, int {\em socktype}, int {\em protocol}, const {\bf QString} \& {\em canon\-Name} = {\tt QString::null}, const {\bf QCString} \& {\em encoded\-Name} = {\tt {\bf QCString}()})}\label{classKNetwork_1_1KResolverEntry_a1}


Constructs a new {\bf KResolver\-Entry}{\rm (p.\,\pageref{classKNetwork_1_1KResolverEntry})} from a {\bf KSocket\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketAddress})} and other data. 

The {\bf KSocket\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketAddress})} {\tt addr} parameter will be deep-copied.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]the address that was resolved \item[{\em socktype}]the socket type of the resolved address \item[{\em protocol}]the protocol of the resolved address \item[{\em canon\-Name}]the canonical name of the resolved hostname \item[{\em encoded\-Name}]the ASCII-compatible encoding of the hostname \end{description}
\end{Desc}


Definition at line 94 of file kresolver.cpp.

References encoded\-Name().\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!KResolverEntry@{KResolverEntry}}
\index{KResolverEntry@{KResolverEntry}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KResolver\-Entry::KResolver\-Entry (const struct sockaddr $\ast$ {\em sa}, Q\_\-UINT16 {\em salen}, int {\em socktype}, int {\em protocol}, const {\bf QString} \& {\em canon\-Name} = {\tt QString::null}, const {\bf QCString} \& {\em encoded\-Name} = {\tt {\bf QCString}()})}\label{classKNetwork_1_1KResolverEntry_a2}


Constructs a new {\bf KResolver\-Entry}{\rm (p.\,\pageref{classKNetwork_1_1KResolverEntry})} from raw forms of socket addresses and other data. 

This constructor instead creates an internal {\bf KSocket\-Address}{\rm (p.\,\pageref{classKNetwork_1_1KSocketAddress})} object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sa}]the sockaddr structure containing the raw address \item[{\em salen}]the length of the sockaddr structure \item[{\em socktype}]the socket type of the resolved address \item[{\em protocol}]the protocol of the resolved address \item[{\em canon\-Name}]the canonical name of the resolved hostname \item[{\em encoded\-Name}]the ASCII-compatible encoding of the hostname \end{description}
\end{Desc}


Definition at line 106 of file kresolver.cpp.

References encoded\-Name().\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!KResolverEntry@{KResolverEntry}}
\index{KResolverEntry@{KResolverEntry}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KResolver\-Entry::KResolver\-Entry (const {\bf KResolver\-Entry} \& {\em other})}\label{classKNetwork_1_1KResolverEntry_a3}


Copy constructor. 

This constructor performs a shallow-copy of the other object. 

Definition at line 119 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!~KResolverEntry@{$\sim$KResolverEntry}}
\index{~KResolverEntry@{$\sim$KResolverEntry}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KResolver\-Entry::$\sim${\bf KResolver\-Entry} ()}\label{classKNetwork_1_1KResolverEntry_a4}


Destructor. 

The destructor frees associated resources with this object. It does not destroy shared data. 

Definition at line 126 of file kresolver.cpp.

\subsection{Member Function Documentation}
\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!address@{address}}
\index{address@{address}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KSocket\-Address} KResolver\-Entry::address () const}\label{classKNetwork_1_1KResolverEntry_a5}


Retrieves the socket address associated with this entry. 



Definition at line 136 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!length@{length}}
\index{length@{length}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-UINT16 KResolver\-Entry::length () const}\label{classKNetwork_1_1KResolverEntry_a6}


Retrieves the length of the socket address structure. 



Definition at line 142 of file kresolver.cpp.

References QCString::length().\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!family@{family}}
\index{family@{family}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KResolver\-Entry::family () const}\label{classKNetwork_1_1KResolverEntry_a7}


Retrieves the family associated with this socket address. 



Definition at line 148 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!canonicalName@{canonicalName}}
\index{canonicalName@{canonicalName}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KResolver\-Entry::canonical\-Name () const}\label{classKNetwork_1_1KResolverEntry_a8}


Retrieves the canonical name associated with this entry, if there is any. 

If the canonical name was not found, this function returns QString::null. 

Definition at line 154 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!encodedName@{encodedName}}
\index{encodedName@{encodedName}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KResolver\-Entry::encoded\-Name () const}\label{classKNetwork_1_1KResolverEntry_a9}


Retrieves the encoded domain name associated with this entry, if there is any. 

If this domain has been resolved through DNS, this will be the the ACE-encoded hostname.

Returns a null {\bf QCString} if such information is not available.

Please note that this information is NOT to be presented to the user, unless requested. 

Definition at line 160 of file kresolver.cpp.

Referenced by KResolver\-Entry().\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!socketType@{socketType}}
\index{socketType@{socketType}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KResolver\-Entry::socket\-Type () const}\label{classKNetwork_1_1KResolverEntry_a10}


Retrieves the socket type associated with this entry. 



Definition at line 166 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!protocol@{protocol}}
\index{protocol@{protocol}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KResolver\-Entry::protocol () const}\label{classKNetwork_1_1KResolverEntry_a11}


Retrieves the protocol associated with this entry. 



Definition at line 172 of file kresolver.cpp.\index{KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}!operator=@{operator=}}
\index{operator=@{operator=}!KNetwork::KResolverEntry@{KNetwork::KResolver\-Entry}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KResolver\-Entry} \& KResolver\-Entry::operator= (const {\bf KResolver\-Entry} \& {\em other})}\label{classKNetwork_1_1KResolverEntry_a12}


Assignment operator. 

This function copies the contents of the other object into this one. Data will be shared between the two of them. 

Definition at line 178 of file kresolver.cpp.

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