\section{KInet\-Socket\-Address Class Reference}
\label{classKInetSocketAddress}\index{KInetSocketAddress@{KInetSocketAddress}}
An Inet (IPv4 or IPv6) socket address an Internet socket address.  


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

Inheritance diagram for KInet\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=71pt]{classKInetSocketAddress__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KInet\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=71pt]{classKInetSocketAddress__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KInet\-Socket\-Address} ()
\item 
{\bf KInet\-Socket\-Address} (const {\bf KInet\-Socket\-Address} \&)
\item 
{\bf KInet\-Socket\-Address} (const sockaddr\_\-in $\ast$sin, ksocklen\_\-t len)
\item 
{\bf KInet\-Socket\-Address} (const sockaddr\_\-in6 $\ast$sin6, ksocklen\_\-t len)
\item 
{\bf KInet\-Socket\-Address} (const in\_\-addr \&addr, unsigned short port)
\item 
{\bf KInet\-Socket\-Address} (const in6\_\-addr \&addr, unsigned short port)
\item 
{\bf KInet\-Socket\-Address} (const {\bf QString} \&addr, unsigned short port, int family=-1)
\item 
virtual {\bf $\sim$KInet\-Socket\-Address} ()
\item 
bool {\bf set\-Address} (const {\bf KInet\-Socket\-Address} \&ksa)
\item 
bool {\bf set\-Address} (const sockaddr\_\-in $\ast$sin, ksocklen\_\-t len)
\item 
bool {\bf set\-Address} (const sockaddr\_\-in6 $\ast$sin6, ksocklen\_\-t len)
\item 
bool {\bf set\-Address} (const in\_\-addr \&addr, unsigned short port)
\item 
bool {\bf set\-Address} (const in6\_\-addr \&addr, unsigned short port)
\item 
bool {\bf set\-Address} (const {\bf QString} \&addr, unsigned short port, int family=-1)
\item 
bool {\bf set\-Host} (const in\_\-addr \&addr)
\item 
bool {\bf set\-Host} (const in6\_\-addr \&addr)
\item 
bool {\bf set\-Host} (const {\bf QString} \&addr, int family=-1)
\item 
bool {\bf set\-Port} (unsigned short port)
\item 
bool {\bf set\-Family} (int family)
\item 
bool {\bf set\-Flowinfo} (Q\_\-UINT32 flowinfo)
\item 
bool {\bf set\-Scope\-Id} (int scopeid)
\item 
virtual {\bf QString} {\bf pretty} () const 
\item 
virtual {\bf QString} {\bf node\-Name} () const 
\item 
virtual {\bf QString} {\bf service\-Name} () const 
\item 
const sockaddr\_\-in $\ast$ {\bf address\-V4} () const 
\item 
const sockaddr\_\-in6 $\ast$ {\bf address\-V6} () const 
\item 
in\_\-addr {\bf host\-V4} () const 
\item 
in6\_\-addr {\bf host\-V6} () const 
\item 
unsigned short {\bf port} () const 
\item 
Q\_\-UINT32 {\bf flowinfo} () const 
\item 
int {\bf scope\-Id} () const 
\item 
virtual ksocklen\_\-t {\bf size} () const 
\item 
{\bf operator const sockaddr\_\-in $\ast$} () const 
\item 
{\bf operator const sockaddr\_\-in6 $\ast$} () const 
\item 
{\bf KInet\-Socket\-Address} \& {\bf operator=} (const {\bf KInet\-Socket\-Address} \&other)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf are\-Equal\-Inet} (const {\bf KSocket\-Address} \&s1, const {\bf KSocket\-Address} \&s2, bool core\-Only)
\item 
static bool {\bf are\-Equal\-Inet6} (const {\bf KSocket\-Address} \&s1, const {\bf KSocket\-Address} \&s2, bool core\-Only)
\item 
static {\bf QString} {\bf addr\-To\-String} (int family, const void $\ast$addr)
\item 
static bool {\bf string\-To\-Addr} (int family, const char $\ast$text, void $\ast$dest)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKInetSocketAddress_b0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KExtended\-Socket}\label{classKInetSocketAddress_n0}

\end{CompactItemize}


\subsection{Detailed Description}
An Inet (IPv4 or IPv6) socket address an Internet socket address. 

This is an IPv4 or IPv6 address of the Internet

This class inherits most of the functionality from {\bf KSocket\-Address}{\rm (p.\,\pageref{classKSocketAddress})}, but is targeted specifically to Internet addresses

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




Definition at line 233 of file ksockaddr.h.

\subsection{Constructor \& Destructor Documentation}
\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address ()}\label{classKInetSocketAddress_a0}


Default constructor. 

Does nothing 

Definition at line 271 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const {\bf KInet\-Socket\-Address} \&)}\label{classKInetSocketAddress_a1}


Copy constructor. 



Definition at line 276 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const sockaddr\_\-in $\ast$ {\em sin}, ksocklen\_\-t {\em len})}\label{classKInetSocketAddress_a2}


Creates an IPv4 socket from raw sockaddr\_\-in. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sin}]a sockaddr\_\-in structure to copy from \item[{\em len}]the socket address length \end{description}
\end{Desc}


Definition at line 282 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const sockaddr\_\-in6 $\ast$ {\em sin6}, ksocklen\_\-t {\em len})}\label{classKInetSocketAddress_a3}


Creates an IPv6 socket from raw sockaddr\_\-in6. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sin6}]a sockaddr\_\-in6 structure to copy from \item[{\em len}]the socket address length \end{description}
\end{Desc}


Definition at line 288 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const in\_\-addr \& {\em addr}, unsigned short {\em port})}\label{classKInetSocketAddress_a4}


Creates a socket from information. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]a binary address \item[{\em port}]a port number \end{description}
\end{Desc}


Definition at line 294 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const in6\_\-addr \& {\em addr}, unsigned short {\em port})}\label{classKInetSocketAddress_a5}


Creates a socket from information. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]a binary address \item[{\em port}]a port number \end{description}
\end{Desc}


Definition at line 300 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!KInetSocketAddress@{KInetSocketAddress}}
\index{KInetSocketAddress@{KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::KInet\-Socket\-Address (const {\bf QString} \& {\em addr}, unsigned short {\em port}, int {\em family} = {\tt -1})}\label{classKInetSocketAddress_a6}


Creates a socket from text representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]a text representation of the address \item[{\em port}]a port number \item[{\em family}]the family for this address. Use -1 to guess the family type \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf set\-Address}{\rm (p.\,\pageref{classKInetSocketAddress_a8})} \end{Desc}


Definition at line 306 of file ksockaddr.cpp.

References set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!~KInetSocketAddress@{$\sim$KInetSocketAddress}}
\index{~KInetSocketAddress@{$\sim$KInetSocketAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::$\sim${\bf KInet\-Socket\-Address} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKInetSocketAddress_a7}


Destructor. 



Definition at line 312 of file ksockaddr.cpp.

\subsection{Member Function Documentation}
\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const {\bf KInet\-Socket\-Address} \& {\em ksa})}\label{classKInetSocketAddress_a8}


Sets this socket to given socket. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ksa}]the other socket \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 319 of file ksockaddr.cpp.

Referenced by KInet\-Socket\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const sockaddr\_\-in $\ast$ {\em sin}, ksocklen\_\-t {\em len})}\label{classKInetSocketAddress_a9}


Sets this socket to given raw socket. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sin}]the raw socket \item[{\em len}]the socket address length \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 330 of file ksockaddr.cpp.

References set\-Host(), and set\-Port().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const sockaddr\_\-in6 $\ast$ {\em sin6}, ksocklen\_\-t {\em len})}\label{classKInetSocketAddress_a10}


Sets this socket to given raw socket. 

Note: this function does not clear the scope ID and flow info values \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sin6}]the raw socket \item[{\em len}]the socket address length \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 342 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const in\_\-addr \& {\em addr}, unsigned short {\em port})}\label{classKInetSocketAddress_a11}


Sets this socket to raw address and port. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]the address \item[{\em port}]the port number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 370 of file ksockaddr.cpp.

References set\-Host(), and set\-Port().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const in6\_\-addr \& {\em addr}, unsigned short {\em port})}\label{classKInetSocketAddress_a12}


Sets this socket to raw address and port. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]the address \item[{\em port}]the port number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 375 of file ksockaddr.cpp.

References set\-Host(), and set\-Port().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Address (const {\bf QString} \& {\em addr}, unsigned short {\em port}, int {\em family} = {\tt -1})}\label{classKInetSocketAddress_a13}


Sets this socket to text address and port. 

You can use the {\tt family} parameter to specify what kind of socket you want this to be. It could be AF\_\-INET or AF\_\-INET6 or -1.

If the value is -1 (default), this function will make an effort to discover what is the family. That isn't too hard, actually, and it works in all cases. But, if you want to be sure that your socket is of the type you want, use this parameter.

This function returns false if the socket address was not valid. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]the address \item[{\em port}]the port number \item[{\em family}]the address family, -1 for any \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 380 of file ksockaddr.cpp.

References set\-Host(), and set\-Port().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setHost@{setHost}}
\index{setHost@{setHost}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Host (const in\_\-addr \& {\em addr})}\label{classKInetSocketAddress_a14}


Sets this socket's host address to given raw address. 

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


Definition at line 385 of file ksockaddr.cpp.

Referenced by set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setHost@{setHost}}
\index{setHost@{setHost}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Host (const in6\_\-addr \& {\em addr})}\label{classKInetSocketAddress_a15}


Sets this socket's host address to given raw address. 

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


Definition at line 393 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!setHost@{setHost}}
\index{setHost@{setHost}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Host (const {\bf QString} \& {\em addr}, int {\em family} = {\tt -1})}\label{classKInetSocketAddress_a16}


Sets this socket's host address to given text representation. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]the address \item[{\em family}]the address family, -1 to guess the family \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 405 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!setPort@{setPort}}
\index{setPort@{setPort}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Port (unsigned short {\em port})}\label{classKInetSocketAddress_a17}


Sets this socket's port number to given port number. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em port}]the port number \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 454 of file ksockaddr.cpp.

Referenced by set\-Address().\index{KInetSocketAddress@{KInet\-Socket\-Address}!setFamily@{setFamily}}
\index{setFamily@{setFamily}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Family (int {\em family})}\label{classKInetSocketAddress_a18}


Turns this into an IPv4 or IPv6 address. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em family}]the new address family \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]false if this is v6 and information was lost. That doesn't mean the conversion was unsuccessful. \end{Desc}


Definition at line 465 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!setFlowinfo@{setFlowinfo}}
\index{setFlowinfo@{setFlowinfo}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Flowinfo (Q\_\-UINT32 {\em flowinfo})}\label{classKInetSocketAddress_a19}


Sets flowinfo information for this socket address if this is IPv6. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em flowinfo}]flowinfo \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 488 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!setScopeId@{setScopeId}}
\index{setScopeId@{setScopeId}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::set\-Scope\-Id (int {\em scopeid})}\label{classKInetSocketAddress_a20}


Sets the scope id for this socket if this is IPv6. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em scopeid}]the scope id \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if successful, false otherwise \end{Desc}


Definition at line 500 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!pretty@{pretty}}
\index{pretty@{pretty}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KInet\-Socket\-Address::pretty () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKInetSocketAddress_a21}


Returns a pretty representation of this address. 

\begin{Desc}
\item[Returns:]a pretty representation \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a1})}.

Definition at line 559 of file ksockaddr.cpp.

References QString::arg(), node\-Name(), and service\-Name().\index{KInetSocketAddress@{KInet\-Socket\-Address}!nodeName@{nodeName}}
\index{nodeName@{nodeName}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KInet\-Socket\-Address::node\-Name () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKInetSocketAddress_a22}


Returns the text representation of the host address. 

\begin{Desc}
\item[Returns:]a text representation of the host address \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a12})}.

Definition at line 574 of file ksockaddr.cpp.

References QString::from\-Latin1().

Referenced by pretty().\index{KInetSocketAddress@{KInet\-Socket\-Address}!serviceName@{serviceName}}
\index{serviceName@{serviceName}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KInet\-Socket\-Address::service\-Name () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKInetSocketAddress_a23}


Returns the text representation of the port number. 

\begin{Desc}
\item[Returns:]the name of the service (a number) \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a13})}.

Definition at line 593 of file ksockaddr.cpp.

References QString::number(), and port().

Referenced by pretty().\index{KInetSocketAddress@{KInet\-Socket\-Address}!addressV4@{addressV4}}
\index{addressV4@{addressV4}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const sockaddr\_\-in $\ast$ KInet\-Socket\-Address::address\-V4 () const}\label{classKInetSocketAddress_a24}


Returns the socket address. 

This will be NULL if this is a non-convertible v6. This function will return an IPv4 socket if this IPv6 socket is a v4-mapped address. That is, if it's really an IPv4 address, but in v6 disguise. \begin{Desc}
\item[Returns:]the sockaddr\_\-in struct, can be 0. \end{Desc}


Definition at line 513 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!addressV6@{addressV6}}
\index{addressV6@{addressV6}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const sockaddr\_\-in6 $\ast$ KInet\-Socket\-Address::address\-V6 () const}\label{classKInetSocketAddress_a25}


Returns the socket address in IPv6. 

\begin{Desc}
\item[Returns:]the sockaddr\_\-in struct, can be 0 if IPv6 is unsupported. \end{Desc}


Definition at line 532 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!hostV4@{hostV4}}
\index{hostV4@{hostV4}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}in\_\-addr KInet\-Socket\-Address::host\-V4 () const}\label{classKInetSocketAddress_a26}


Returns the host address. 

Might be empty. \begin{Desc}
\item[Returns:]the host address \end{Desc}


Definition at line 541 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!hostV6@{hostV6}}
\index{hostV6@{hostV6}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}in6\_\-addr KInet\-Socket\-Address::host\-V6 () const}\label{classKInetSocketAddress_a27}


Returns the host address. 

WARNING: this function is not defined if there is no IPv6 support \begin{Desc}
\item[Returns:]the host address \end{Desc}
\index{KInetSocketAddress@{KInet\-Socket\-Address}!port@{port}}
\index{port@{port}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short KInet\-Socket\-Address::port () const}\label{classKInetSocketAddress_a28}


Returns the port number. 

\begin{Desc}
\item[Returns:]the port number \end{Desc}


Definition at line 598 of file ksockaddr.cpp.

Referenced by service\-Name().\index{KInetSocketAddress@{KInet\-Socket\-Address}!flowinfo@{flowinfo}}
\index{flowinfo@{flowinfo}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}Q\_\-UINT32 KInet\-Socket\-Address::flowinfo () const}\label{classKInetSocketAddress_a29}


Returns flowinfo for IPv6 socket. 

\begin{Desc}
\item[Returns:]the flowinfo, 0 if unsupported \end{Desc}


Definition at line 608 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!scopeId@{scopeId}}
\index{scopeId@{scopeId}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KInet\-Socket\-Address::scope\-Id () const}\label{classKInetSocketAddress_a30}


Returns the scope id for this IPv6 socket. 

\begin{Desc}
\item[Returns:]the scope id \end{Desc}
\index{KInetSocketAddress@{KInet\-Socket\-Address}!size@{size}}
\index{size@{size}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ksocklen\_\-t KInet\-Socket\-Address::size () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKInetSocketAddress_a31}


Returns the socket length. 

Will be either sizeof(sockaddr\_\-in) or sizeof(sockaddr\_\-in6) \begin{Desc}
\item[Returns:]the length of the socket \end{Desc}


Reimplemented from {\bf KSocket\-Address} {\rm (p.\,\pageref{classKSocketAddress_a3})}.

Definition at line 617 of file ksockaddr.cpp.\index{KInetSocketAddress@{KInet\-Socket\-Address}!areEqualInet@{areEqualInet}}
\index{areEqualInet@{areEqualInet}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::are\-Equal\-Inet (const {\bf KSocket\-Address} \& {\em s1}, const {\bf KSocket\-Address} \& {\em s2}, bool {\em core\-Only})\hspace{0.3cm}{\tt  [static]}}\label{classKInetSocketAddress_e0}


Compares two IPv4 addresses. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s1}]the first address to compare \item[{\em s2}]the second address to compare \item[{\em core\-Only}]true if only core parts should be compared (only the address) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the given addresses are equal. \end{Desc}
\begin{Desc}
\item[See also:]{\bf are\-Equal\-Inet6()}{\rm (p.\,\pageref{classKInetSocketAddress_e1})} 

{\bf KSocket\-Address::is\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a7})} 

{\bf KSocket\-Address::is\-Core\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a10})} \end{Desc}


Definition at line 629 of file ksockaddr.cpp.

Referenced by KSocket\-Address::is\-Core\-Equal(), and KSocket\-Address::is\-Equal().\index{KInetSocketAddress@{KInet\-Socket\-Address}!areEqualInet6@{areEqualInet6}}
\index{areEqualInet6@{areEqualInet6}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::are\-Equal\-Inet6 (const {\bf KSocket\-Address} \& {\em s1}, const {\bf KSocket\-Address} \& {\em s2}, bool {\em core\-Only})\hspace{0.3cm}{\tt  [static]}}\label{classKInetSocketAddress_e1}


Compares two IPv6 addresses. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em s1}]the first address to compare \item[{\em s2}]the second address to compare \item[{\em core\-Only}]true if only core parts should be compared (only the address) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the given addresses are equal. \end{Desc}
\begin{Desc}
\item[See also:]{\bf are\-Equal\-Inet()}{\rm (p.\,\pageref{classKInetSocketAddress_e0})} 

{\bf KSocket\-Address::is\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a7})} 

{\bf KSocket\-Address::is\-Core\-Equal()}{\rm (p.\,\pageref{classKSocketAddress_a10})} \end{Desc}


Definition at line 646 of file ksockaddr.cpp.

Referenced by KSocket\-Address::is\-Core\-Equal(), and KSocket\-Address::is\-Equal().\index{KInetSocketAddress@{KInet\-Socket\-Address}!operator const sockaddr_in *@{operator const sockaddr\_\-in $\ast$}}
\index{operator const sockaddr_in *@{operator const sockaddr\_\-in $\ast$}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::operator const sockaddr\_\-in $\ast$ () const\hspace{0.3cm}{\tt  [inline]}}\label{classKInetSocketAddress_a32}


Returns the socket address. 

This will be NULL if this is a non-convertible v6. \begin{Desc}
\item[Returns:]the sockaddr\_\-in structure, can be 0 if v6. \end{Desc}
\begin{Desc}
\item[See also:]{\bf address\-V4()}{\rm (p.\,\pageref{classKInetSocketAddress_a24})} \end{Desc}


Definition at line 514 of file ksockaddr.h.\index{KInetSocketAddress@{KInet\-Socket\-Address}!operator const sockaddr_in6 *@{operator const sockaddr\_\-in6 $\ast$}}
\index{operator const sockaddr_in6 *@{operator const sockaddr\_\-in6 $\ast$}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInet\-Socket\-Address::operator const sockaddr\_\-in6 $\ast$ () const\hspace{0.3cm}{\tt  [inline]}}\label{classKInetSocketAddress_a33}


Returns the socket address. 

\begin{Desc}
\item[Returns:]the sockaddr\_\-in structure, can be 0 if v6 is unsupported. \end{Desc}
\begin{Desc}
\item[See also:]{\bf address\-V6()}{\rm (p.\,\pageref{classKInetSocketAddress_a25})} \end{Desc}


Definition at line 522 of file ksockaddr.h.\index{KInetSocketAddress@{KInet\-Socket\-Address}!operator=@{operator=}}
\index{operator=@{operator=}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KInet\-Socket\-Address}\& KInet\-Socket\-Address::operator= (const {\bf KInet\-Socket\-Address} \& {\em other})\hspace{0.3cm}{\tt  [inline]}}\label{classKInetSocketAddress_a34}


Sets this object to be the same as the other. 



Definition at line 528 of file ksockaddr.h.\index{KInetSocketAddress@{KInet\-Socket\-Address}!addrToString@{addrToString}}
\index{addrToString@{addrToString}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KInet\-Socket\-Address::addr\-To\-String (int {\em family}, const void $\ast$ {\em addr})\hspace{0.3cm}{\tt  [static]}}\label{classKInetSocketAddress_e2}


Convert s the given raw address into text form. 

This function returns QString::null if the address cannot be converted. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em family}]the family of the address \item[{\em addr}]the address, in raw form \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the converted address, or QString::null if not possible. \end{Desc}


Definition at line 716 of file ksockaddr.cpp.

References QString::from\-Latin1().\index{KInetSocketAddress@{KInet\-Socket\-Address}!stringToAddr@{stringToAddr}}
\index{stringToAddr@{stringToAddr}!KInetSocketAddress@{KInet\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KInet\-Socket\-Address::string\-To\-Addr (int {\em family}, const char $\ast$ {\em text}, void $\ast$ {\em dest})\hspace{0.3cm}{\tt  [static]}}\label{classKInetSocketAddress_e3}


Converts the address given in text form into raw form. 

The size of the destination buffer {\tt dest} is supposed to be large enough to hold the address of the given family. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em family}]the family of the address \item[{\em text}]the text representation of the address \item[{\em dest}]the destination buffer of the address \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if convertion was successful. \end{Desc}


Definition at line 723 of file ksockaddr.cpp.

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