#include <ksockaddr.h>
Public Member Functions | |
KUnixSocketAddress () | |
KUnixSocketAddress (const sockaddr_un *raw_data, ksocklen_t size) | |
KUnixSocketAddress (TQCString pathname) | |
virtual | ~KUnixSocketAddress () |
bool | setAddress (const sockaddr_un *socket_address, ksocklen_t size) |
bool | setAddress (TQCString path) |
TQCString | pathname () const |
virtual TQString | pretty () const |
virtual TQString | serviceName () const |
const sockaddr_un * | address () const |
operator const sockaddr_un * () const | |
Public Member Functions inherited from TDESocketAddress | |
virtual | ~TDESocketAddress () |
const sockaddr * | address () const |
virtual ksocklen_t | size () const |
operator const sockaddr * () const | |
int | family () const |
int | ianaFamily () const |
virtual bool | isEqual (const TDESocketAddress &other) const |
bool | isEqual (const TDESocketAddress *other) const |
bool | operator== (const TDESocketAddress &other) const |
bool | isCoreEqual (const TDESocketAddress &other) const |
bool | isCoreEqual (const TDESocketAddress *other) const |
virtual TQString | nodeName () const |
Static Public Member Functions | |
static bool | areEqualUnix (const TDESocketAddress &s1, const TDESocketAddress &s2, bool coreOnly) |
Static Public Member Functions inherited from TDESocketAddress | |
static TDESocketAddress * | newAddress (const struct sockaddr *sa, ksocklen_t size) |
static int | ianaFamily (int af) |
static int | fromIanaFamily (int iana) |
Protected Member Functions | |
virtual void | virtual_hook (int id, void *data) |
Protected Member Functions inherited from TDESocketAddress | |
TDESocketAddress () | |
TDESocketAddress (const sockaddr *sa, ksocklen_t size) | |
Friends | |
class | KExtendedSocket |
Additional Inherited Members | |
Protected Attributes inherited from TDESocketAddress | |
sockaddr * | data |
ksocklen_t | datasize |
bool | owndata |
Detailed Description
A Unix socket address.
This is a Unix socket address.
This class expects TQCString instead of TQString values, which means the filenames should be encoded in whatever form locale/system deems necessary before passing down to the function
a Unix socket address
Definition at line 584 of file ksockaddr.h.
Constructor & Destructor Documentation
◆ KUnixSocketAddress() [1/3]
KUnixSocketAddress::KUnixSocketAddress | ( | ) |
Default constructor.
Definition at line 741 of file ksockaddr.cpp.
◆ KUnixSocketAddress() [2/3]
KUnixSocketAddress::KUnixSocketAddress | ( | const sockaddr_un * | raw_data, |
ksocklen_t | size | ||
) |
Constructor from raw data.
- Parameters
-
raw_data raw data size data length
Definition at line 746 of file ksockaddr.cpp.
◆ KUnixSocketAddress() [3/3]
KUnixSocketAddress::KUnixSocketAddress | ( | TQCString | pathname | ) |
Constructor from pathname.
- Parameters
-
pathname pathname
Definition at line 752 of file ksockaddr.cpp.
◆ ~KUnixSocketAddress()
|
virtual |
Destructor.
Definition at line 758 of file ksockaddr.cpp.
Member Function Documentation
◆ address()
const sockaddr_un * KUnixSocketAddress::address | ( | ) | const |
Returns raw socket address.
- Returns
- the raw socket address (can be 0 if uninitialized)
Definition at line 862 of file ksockaddr.cpp.
◆ 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.
Definition at line 867 of file ksockaddr.cpp.
◆ operator const sockaddr_un *()
|
inline |
Returns raw socket address.
- Returns
- the raw socket address (can be 0 if uninitialized)
- See also
- address()
Definition at line 658 of file ksockaddr.h.
◆ pathname()
TQCString KUnixSocketAddress::pathname | ( | ) | const |
Returns the pathname.
- Returns
- the pathname, can be TQCString::null if uninitialized, or "" if unknown
Definition at line 838 of file ksockaddr.cpp.
◆ pretty()
|
virtual |
Returns pretty representation of this socket.
- Returns
- a pretty text representation of the socket.
Reimplemented from TDESocketAddress.
Definition at line 849 of file ksockaddr.cpp.
◆ serviceName()
|
virtual |
Returns the service name for this socket, as KExtendedSocket::lookup expects as the service argument.
In the case of Internet sockets, this is the port number. The default implementation returns TQString::null.
- Returns
- the service name, can be TQString::null
Reimplemented from TDESocketAddress.
Definition at line 857 of file ksockaddr.cpp.
◆ setAddress() [1/2]
bool KUnixSocketAddress::setAddress | ( | const sockaddr_un * | socket_address, |
ksocklen_t | size | ||
) |
Sets this to given sockaddr_un.
- Parameters
-
socket_address socket address size the socket length
- Returns
- true if successful, false otherwise
Definition at line 763 of file ksockaddr.cpp.
◆ setAddress() [2/2]
bool KUnixSocketAddress::setAddress | ( | TQCString | path | ) |
Sets this to given pathname.
- Parameters
-
path pathname
- Returns
- true if successful, false otherwise
Definition at line 802 of file ksockaddr.cpp.
The documentation for this class was generated from the following files: