Search for usage in LXR

KNetwork::KUnixSocketAddress Class Reference

#include <k3socketaddress.h>

Inheritance diagram for KNetwork::KUnixSocketAddress:

Public Member Functions

 KUnixSocketAddress ()
 KUnixSocketAddress (const KUnixSocketAddress &other)
 KUnixSocketAddress (const QString &pathname)
 KUnixSocketAddress (const sockaddr *sa, quint16 len)
 ~KUnixSocketAddress () override
 operator const sockaddr_un * () const
KUnixSocketAddressoperator= (const KUnixSocketAddress &other)
QString pathname () const
KUnixSocketAddresssetPathname (const QString &path)
- Public Member Functions inherited from KNetwork::KSocketAddress
 KSocketAddress ()
 KSocketAddress (const KSocketAddress &other)
 KSocketAddress (const sockaddr *sa, quint16 len)
virtual ~KSocketAddress ()
sockaddr * address ()
const sockaddr * address () const
KInetSocketAddressasInet ()
KInetSocketAddress asInet () const
KUnixSocketAddressasUnix ()
KUnixSocketAddress asUnix () const
int family () const
int ianaFamily () const
quint16 length () const
virtual QString nodeName () const
 operator const sockaddr * () const
KSocketAddressoperator= (const KSocketAddress &other)
bool operator== (const KSocketAddress &other) const
virtual QString serviceName () const
KSocketAddresssetAddress (const sockaddr *sa, quint16 len)
virtual KSocketAddresssetFamily (int family)
KSocketAddresssetLength (quint16 len)
virtual QString toString () const

Protected Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from KNetwork::KSocketAddress
static int fromIanaFamily (int iana)
static int ianaFamily (int af)
- 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.

Thiago Macieira thiag[email protected][email protected][email protected]
Use KSocketFactory or KLocalSocket instead

Definition at line 898 of file k3socketaddress.h.

Constructor & Destructor Documentation

◆ KUnixSocketAddress() [1/5]

KUnixSocketAddress::KUnixSocketAddress ( )

Default constructor.

Creates an empty object.

Definition at line 913 of file k3socketaddress.cpp.

◆ KUnixSocketAddress() [2/5]

KUnixSocketAddress::KUnixSocketAddress ( const sockaddr *  sa,
quint16  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.

sathe socket address structure
lenthe structure's length

Definition at line 917 of file k3socketaddress.cpp.

◆ KUnixSocketAddress() [3/5]

KUnixSocketAddress::KUnixSocketAddress ( const KUnixSocketAddress other)

Copy constructor.

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

otherthe other object

Definition at line 925 of file k3socketaddress.cpp.

◆ KUnixSocketAddress() [4/5]

KUnixSocketAddress::KUnixSocketAddress ( const QString pathname)

Constructs an object from the given pathname.

Definition at line 930 of file k3socketaddress.cpp.

◆ ~KUnixSocketAddress()

KUnixSocketAddress::~KUnixSocketAddress ( )


Definition at line 940 of file k3socketaddress.cpp.

◆ KUnixSocketAddress() [5/5]

KUnixSocketAddress::KUnixSocketAddress ( KSocketAddressData *  d)

extra constructor

Definition at line 935 of file k3socketaddress.cpp.

Member Function Documentation

◆ operator const sockaddr_un *()

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

Cast operator to sockaddr_un.

Definition at line 946 of file k3socketaddress.h.

◆ operator=()

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

Copy operator.

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

otherthe other

Definition at line 944 of file k3socketaddress.cpp.

◆ pathname()

QString KUnixSocketAddress::pathname ( ) const

Returns the pathname associated with this object.

Will return QString() if this object is empty.

Definition at line 950 of file k3socketaddress.cpp.

◆ setPathname()

KUnixSocketAddress & KUnixSocketAddress::setPathname ( const QString path)

Sets the pathname for the object.

a reference to itself

Definition at line 958 of file k3socketaddress.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Jan 30 2023 04:01:51 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.