#include <ksockaddr.h>
Inheritance diagram for KSocketAddress:

Public Methods | |
| virtual | ~KSocketAddress () |
| virtual QString | pretty () const |
| const sockaddr * | address () const |
| virtual ksocklen_t | size () const |
| operator const sockaddr * () const | |
| int | family () const |
| int | ianaFamily () const |
| virtual bool | isEqual (const KSocketAddress &other) const |
| bool | operator== (const KSocketAddress &other) const |
| bool | isCoreEqual (const KSocketAddress &other) const |
| bool | isCoreEqual (const KSocketAddress *other) const |
| virtual QString | nodeName () const |
| virtual QString | serviceName () const |
Static Public Methods | |
| KSocketAddress * | newAddress (const struct sockaddr *, ksocklen_t size) |
| int | ianaFamily (int af) |
| int | fromIanaFamily (int iana) |
Protected Methods | |
| KSocketAddress () | |
| KSocketAddress (const sockaddr *sa, ksocklen_t size) | |
A socket address.
This class envelopes almost if not all socket addresses.
Definition at line 48 of file ksockaddr.h.
|
|
Creates an empty class Definition at line 55 of file ksockaddr.h. |
|
||||||||||||
|
Creates with given data
|
|
|
Destructor. |
|
|
Returns a sockaddr structure, for passing down to library functions.
Reimplemented in KUnixSocketAddress. Definition at line 80 of file ksockaddr.h. |
|
|
Returns the family of this address.
Referenced by ianaFamily(). |
|
|
Returns the address family of the given IANA family number.
|
|
|
Returns the IANA family number of the given address family. Returns 0 if there is no corresponding IANA family number.
|
|
|
Returns the IANA family number of this address.
Definition at line 109 of file ksockaddr.h. References family(). |
|
|
Some sockets may differ in such things as services or port numbers, like Internet sockets. This function compares only the core part of that, if possible. If not possible, like the default implementation, this returns the same as isEqual.
Definition at line 150 of file ksockaddr.h. References isCoreEqual(). |
|
|
Some sockets may differ in such things as services or port numbers, like Internet sockets. This function compares only the core part of that, if possible. If not possible, like the default implementation, this returns the same as isEqual.
Referenced by isCoreEqual(). |
|
|
Returns true if this equals the other socket.
Referenced by operator==(). |
|
||||||||||||
|
Creates a new KSocketAddress or descendant class from given raw socket address.
|
|
|
Returns the node name of this socket, as KExtendedSocket::lookup expects as the first argument. In the case of Internet sockets, this is the hostname. The default implementation returns QString::null.
Reimplemented in KInetSocketAddress. |
|
|
Returns a sockaddr structure, for passing down to library functions.
Definition at line 95 of file ksockaddr.h. |
|
|
Overloaded == operator.
Definition at line 125 of file ksockaddr.h. References isEqual(). |
|
|
Returns a string representation of this socket.
Reimplemented in KInetSocketAddress, and KUnixSocketAddress. |
|
|
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 QString::null.
Reimplemented in KInetSocketAddress, and KUnixSocketAddress. |
|
|
Returns sockaddr structure size.
Reimplemented in KInetSocketAddress. Definition at line 87 of file ksockaddr.h. Referenced by KAddressInfo::length(). |
1.2.18