\section{KUnix\-Socket\-Address Class Reference}
\label{classKUnixSocketAddress}\index{KUnixSocketAddress@{KUnixSocketAddress}}
A Unix socket address a Unix socket address.  


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

Inheritance diagram for KUnix\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKUnixSocketAddress__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KUnix\-Socket\-Address:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKUnixSocketAddress__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KUnix\-Socket\-Address} ()
\item 
{\bf KUnix\-Socket\-Address} (const sockaddr\_\-un $\ast$raw\_\-data, ksocklen\_\-t size)
\item 
{\bf KUnix\-Socket\-Address} ({\bf QCString} pathname)
\item 
virtual {\bf $\sim$KUnix\-Socket\-Address} ()
\item 
bool {\bf set\-Address} (const sockaddr\_\-un $\ast$socket\_\-address, ksocklen\_\-t size)
\item 
bool {\bf set\-Address} ({\bf QCString} path)
\item 
{\bf QCString} {\bf pathname} () const 
\item 
virtual {\bf QString} {\bf pretty} () const 
\item 
virtual {\bf QString} {\bf service\-Name} () const 
\item 
const sockaddr\_\-un $\ast$ {\bf address} () const 
\item 
{\bf operator const sockaddr\_\-un $\ast$} () const 
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static bool {\bf are\-Equal\-Unix} (const {\bf KSocket\-Address} \&s1, const {\bf KSocket\-Address} \&s2, bool core\-Only)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKUnixSocketAddress_b0}

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

\end{CompactItemize}


\subsection{Detailed Description}
A Unix socket address a Unix socket address. 

This is a Unix socket address.

This class expects {\bf QCString} instead of {\bf QString} values, which means the filenames should be encoded in whatever form locale/system deems necessary before passing down to the function

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




Definition at line 584 of file ksockaddr.h.

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


Default constructor. 



Definition at line 741 of file ksockaddr.cpp.\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!KUnixSocketAddress@{KUnixSocketAddress}}
\index{KUnixSocketAddress@{KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::KUnix\-Socket\-Address (const sockaddr\_\-un $\ast$ {\em raw\_\-data}, ksocklen\_\-t {\em size})}\label{classKUnixSocketAddress_a1}


Constructor from raw data. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em raw\_\-data}]raw data \item[{\em size}]data length \end{description}
\end{Desc}


Definition at line 746 of file ksockaddr.cpp.

References set\-Address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!KUnixSocketAddress@{KUnixSocketAddress}}
\index{KUnixSocketAddress@{KUnixSocketAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::KUnix\-Socket\-Address ({\bf QCString} {\em pathname})}\label{classKUnixSocketAddress_a2}


Constructor from pathname. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pathname}]pathname \end{description}
\end{Desc}


Definition at line 752 of file ksockaddr.cpp.

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


Destructor. 



Definition at line 758 of file ksockaddr.cpp.

\subsection{Member Function Documentation}
\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::set\-Address (const sockaddr\_\-un $\ast$ {\em socket\_\-address}, ksocklen\_\-t {\em size})}\label{classKUnixSocketAddress_a4}


Sets this to given sockaddr\_\-un. 

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


Definition at line 763 of file ksockaddr.cpp.

Referenced by KUnix\-Socket\-Address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!setAddress@{setAddress}}
\index{setAddress@{setAddress}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::set\-Address ({\bf QCString} {\em path})}\label{classKUnixSocketAddress_a5}


Sets this to given pathname. 

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


Definition at line 802 of file ksockaddr.cpp.

References QCString::length().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!pathname@{pathname}}
\index{pathname@{pathname}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KUnix\-Socket\-Address::pathname () const}\label{classKUnixSocketAddress_a6}


Returns the pathname. 

\begin{Desc}
\item[Returns:]the pathname, can be QCString::null if uninitialized, or \char`\"{}\char`\"{} if unknown \end{Desc}


Definition at line 838 of file ksockaddr.cpp.

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


Returns pretty representation of this socket. 

\begin{Desc}
\item[Returns:]a pretty text representation of the socket. \end{Desc}


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

Definition at line 849 of file ksockaddr.cpp.

References QFile::decode\-Name(), QCString::is\-Empty(), and pathname().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!serviceName@{serviceName}}
\index{serviceName@{serviceName}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KUnix\-Socket\-Address::service\-Name () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKUnixSocketAddress_a8}


Returns the service name for this socket, as KExtended\-Socket::lookup expects as the service argument. 

In the case of Internet sockets, this is the port number. The default implementation returns QString::null. \begin{Desc}
\item[Returns:]the service name, can be QString::null \end{Desc}


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

Definition at line 857 of file ksockaddr.cpp.

References QString::from\-Utf8(), and pathname().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!address@{address}}
\index{address@{address}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const sockaddr\_\-un $\ast$ KUnix\-Socket\-Address::address () const}\label{classKUnixSocketAddress_a9}


Returns raw socket address. 

\begin{Desc}
\item[Returns:]the raw socket address (can be 0 if uninitialized) \end{Desc}


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

Definition at line 862 of file ksockaddr.cpp.\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!operator const sockaddr_un *@{operator const sockaddr\_\-un $\ast$}}
\index{operator const sockaddr_un *@{operator const sockaddr\_\-un $\ast$}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KUnix\-Socket\-Address::operator const sockaddr\_\-un $\ast$ () const\hspace{0.3cm}{\tt  [inline]}}\label{classKUnixSocketAddress_a10}


Returns raw socket address. 

\begin{Desc}
\item[Returns:]the raw socket address (can be 0 if uninitialized) \end{Desc}
\begin{Desc}
\item[See also:]{\bf address()}{\rm (p.\,\pageref{classKUnixSocketAddress_a9})} \end{Desc}


Definition at line 658 of file ksockaddr.h.

References KSocket\-Address::address().\index{KUnixSocketAddress@{KUnix\-Socket\-Address}!areEqualUnix@{areEqualUnix}}
\index{areEqualUnix@{areEqualUnix}!KUnixSocketAddress@{KUnix\-Socket\-Address}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KUnix\-Socket\-Address::are\-Equal\-Unix (const {\bf KSocket\-Address} \& {\em s1}, const {\bf KSocket\-Address} \& {\em s2}, bool {\em core\-Only})\hspace{0.3cm}{\tt  [static]}}\label{classKUnixSocketAddress_e0}


Compares two unix socket 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 (currently unused) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the given addresses are equal. \end{Desc}
\begin{Desc}
\item[See also:]{\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 867 of file ksockaddr.cpp.

Referenced by KSocket\-Address::is\-Core\-Equal(), and KSocket\-Address::is\-Equal().

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