class KUnixSocketAddress

# class KUnixSocketAddress | a Unix socket address. More...
Definition | `#include <ksockaddr.h>`
Inherits | KSocketAddress [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KUnixSocketAddress ()
- KUnixSocketAddress (const sockaddr_un* raw_data, ksocklen_t size)
- KUnixSocketAddress (QCString pathname)
- virtual ~KUnixSocketAddress ()
- bool setAddress (const sockaddr_un* socket_address, ksocklen_t size)
- bool setAddress (QCString path)
- QCString pathname () const
- virtual QString pretty () const
- virtual QString serviceName () const
- const sockaddr_un* address () const
- operator const sockaddr_un* () const

#### Public Static Methods

- static bool areEqualUnix (const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly)

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

## Detailed Description

A Unix socket address

This is a Unix socket address.

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

KUnixSocketAddress () | ### KUnixSocketAddress

Default constructor

KUnixSocketAddress (const sockaddr_un* raw_data, ksocklen_t size) | ### KUnixSocketAddress

Constructor from raw data.

Parameters:

raw_data | raw data
size | data length

KUnixSocketAddress (QCString pathname) | ### KUnixSocketAddress

Constructor from pathname.

Parameters:

path | pathname

~KUnixSocketAddress () | ### ~KUnixSocketAddress

[virtual]

Destructor

bool setAddress (const sockaddr_un* socket_address, ksocklen_t size) | ### setAddress

Sets this to given sockaddr_un.

Parameters:

socket_address | socket address
size | the socket length

Returns: true if successful, false otherwise

bool setAddress (QCString path) | ### setAddress

Sets this to given pathname.

Parameters:

path | pathname

Returns: true if successful, false otherwise

QCString pathname () | ### pathname

[const]

Returns the pathname.

Returns: the pathname, can be QCString::null if uninitialized, or "" if unknown

QString pretty () | ### pretty

[const virtual]

Returns pretty representation of this socket.

Returns: a pretty text representation of the socket.

Reimplemented from KSocketAddress.

QString serviceName () | ### serviceName

[const virtual]

Reimplemented from KSocketAddress.

const sockaddr_un* address () | ### address

[const]

Returns raw socket address.

Returns: the raw socket address (can be 0 if uninitialized)

Reimplemented from KSocketAddress.

operator const sockaddr_un* () | ### operator const sockaddr_un*

[const]

Returns raw socket address.

Returns: the raw socket address (can be 0 if uninitialized)

See also: address()

bool areEqualUnix (const KSocketAddress &s1, const KSocketAddress &s2, bool coreOnly) | ### areEqualUnix

[static]

Compares two unix socket addresses.

Parameters:

s1 | the first address to compare
s2 | the second address to compare
coreOnly | true if only core parts should be compared (currently unused)

Returns: true if the given addresses are equal.

See also: KSocketAddress::isEqual(), KSocketAddress::isCoreEqual()

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Reimplemented from KSocketAddress.

- Version: $Id: ksockaddr.h,v 1.15 2002/09/09 21:11:35 tjansen Exp $
- Author: Thiago Macieira
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:15 2003, using kdoc 2.0a54.