KNetwork::KUnixSocketAddress Class Reference

`#include <ksocketaddress.h>`

Inheritance diagram for KNetwork::KUnixSocketAddress:

## Public Member Functions

| KUnixSocketAddress ()
| KUnixSocketAddress (const sockaddr *sa, Q_UINT16 len)
| KUnixSocketAddress (const KUnixSocketAddress &other)
| KUnixSocketAddress (const QString &pathname)
virtual | ~KUnixSocketAddress ()
KUnixSocketAddress & | operator= (const KUnixSocketAddress &other)
| operator const sockaddr_un * () const
QString | pathname () const
KUnixSocketAddress & | setPathname (const QString &path)
Public Member Functions inherited from KNetwork::KSocketAddress
| KSocketAddress ()
| KSocketAddress (const sockaddr *sa, Q_UINT16 len)
| KSocketAddress (const KSocketAddress &other)
virtual | ~KSocketAddress ()
KSocketAddress & | operator= (const KSocketAddress &other)
const sockaddr * | address () const
sockaddr * | address ()
KSocketAddress & | setAddress (const sockaddr *sa, Q_UINT16 len)
| operator const sockaddr * () const
Q_UINT16 | length () const
KSocketAddress & | setLength (Q_UINT16 len)
int | family () const
virtual KSocketAddress & | setFamily (int family)
int | ianaFamily () const
bool | operator== (const KSocketAddress &other) const
virtual QString | nodeName () const
virtual QString | serviceName () const
virtual QString | toString () const
KInetSocketAddress & | asInet ()
KInetSocketAddress | asInet () const
KUnixSocketAddress & | asUnix ()
KUnixSocketAddress | asUnix () const

## Protected Member Functions

| KUnixSocketAddress (KSocketAddressData *d)
Protected Member Functions inherited from KNetwork::KSocketAddress
| KSocketAddress (KSocketAddressData *d)

## Friends

class | KSocketAddress

## Additional Inherited Members

Static Public Member Functions inherited from KNetwork::KSocketAddress
static int | ianaFamily (int af)
static int | fromIanaFamily (int iana)
Protected Attributes inherited from KNetwork::KSocketAddress
KSocketAddressData * | d

## Detailed Description

A Unix (local) socket address.

This is a Unix socket address.

Note that this class uses QStrings to represent filenames, which means the proper encoding is used to translate into valid filesystem file names.

Author
  Thiago Macieira thiag.nosp@m.o.ma.nosp@m.cieir.nosp@m.a@kd.nosp@m.email.nosp@m..net

Definition at line 840 of file ksocketaddress.h.

## Constructor & Destructor Documentation

KUnixSocketAddress::KUnixSocketAddress | ( |  | ) |

Default constructor.

Creates an empty object.

Definition at line 903 of file ksocketaddress.cpp.

KUnixSocketAddress::KUnixSocketAddress | ( | const sockaddr * | sa,
|  | Q_UINT16 | len
| ) |  |

Creates this object with the given raw data.

If the sockaddr structure does not contain a Local namespace (Unix) socket, this object will be created empty.

Parameters

  sa | the socket address structure
  len | the structure's length

Definition at line 907 of file ksocketaddress.cpp.

KUnixSocketAddress::KUnixSocketAddress | ( | const KUnixSocketAddress & | other | ) |

Copy constructor.

Creates a copy of the other object, sharing the data explicitly.

Parameters

  other | the other object

Definition at line 914 of file ksocketaddress.cpp.

KUnixSocketAddress::KUnixSocketAddress | ( | const QString & | pathname | ) |

Constructs an object from the given pathname.

Definition at line 919 of file ksocketaddress.cpp.

KUnixSocketAddress::~KUnixSocketAddress | ( |  | ) |

virtual

Destructor.

Definition at line 929 of file ksocketaddress.cpp.

## Member Function Documentation

KNetwork::KUnixSocketAddress::operator const sockaddr_un * | ( |  | ) | const

inline

Cast operator to sockaddr_un.

Definition at line 888 of file ksocketaddress.h.

KUnixSocketAddress & KUnixSocketAddress::operator= | ( | const KUnixSocketAddress & | other | ) |

Copy operator.

Copies the contents of the other object into this one. Data is explicitly shared.

Parameters

  other | the other

Definition at line 933 of file ksocketaddress.cpp.

QString KUnixSocketAddress::pathname | ( |  | ) | const

Returns the pathname associated with this object.

Will return QString::null if this object is empty.

Definition at line 939 of file ksocketaddress.cpp.

KUnixSocketAddress & KUnixSocketAddress::setPathname | ( | const QString & | path | ) |

Sets the pathname for the object.

Returns
  a reference to itself

Definition at line 946 of file ksocketaddress.cpp.

The documentation for this class was generated from the following files:

- ksocketaddress.h
- ksocketaddress.cpp

KDE Home | KDE Accessibility Home | Description of Access Keys