• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KNetwork::KResolverEntry

KNetwork::KResolverEntry Class Reference

One resolution entry. More...

#include <kresolver.h>

List of all members.


Public Member Functions

KSocketAddress address () const
QString canonicalName () const
QCString encodedName () const
int family () const
 KResolverEntry (const KResolverEntry &other)
 KResolverEntry (const struct sockaddr *sa, Q_UINT16 salen, int socktype, int protocol, const QString &canonName=QString::null, const QCString &encodedName=QCString())
 KResolverEntry (const KSocketAddress &addr, int socktype, int protocol, const QString &canonName=QString::null, const QCString &encodedName=QCString())
 KResolverEntry ()
Q_UINT16 length () const
KResolverEntry & operator= (const KResolverEntry &other)
int protocol () const
int socketType () const
 ~KResolverEntry ()

Detailed Description

One resolution entry.

This class is one element in the resolution results list. It contains the socket address for connecting, as well as a bit more of information: the socket type, address family and protocol numbers.

This class contains all the information required for creating, binding and connecting a socket.

KResolverEntry objects implicitly share data, so copying them is quite efficient.

Author:
Thiago Macieira <thiago.macieira@kdemail.net>

Definition at line 66 of file kresolver.h.


Constructor & Destructor Documentation

KResolverEntry::KResolverEntry (  ) 

Default constructor.

Definition at line 90 of file kresolver.cpp.

KResolverEntry::KResolverEntry ( const KSocketAddress &  addr,
int  socktype,
int  protocol,
const QString &  canonName = QString::null,
const QCString &  encodedName = QCString() 
)

Constructs a new KResolverEntry from a KSocketAddress and other data.

The KSocketAddress addr parameter will be deep-copied.

Parameters:
addr the address that was resolved
socktype the socket type of the resolved address
protocol the protocol of the resolved address
canonName the canonical name of the resolved hostname
encodedName the ASCII-compatible encoding of the hostname

Definition at line 96 of file kresolver.cpp.

KResolverEntry::KResolverEntry ( const struct sockaddr *  sa,
Q_UINT16  salen,
int  socktype,
int  protocol,
const QString &  canonName = QString::null,
const QCString &  encodedName = QCString() 
)

Constructs a new KResolverEntry from raw forms of socket addresses and other data.

This constructor instead creates an internal KSocketAddress object.

Parameters:
sa the sockaddr structure containing the raw address
salen the length of the sockaddr structure
socktype the socket type of the resolved address
protocol the protocol of the resolved address
canonName the canonical name of the resolved hostname
encodedName the ASCII-compatible encoding of the hostname

Definition at line 108 of file kresolver.cpp.

KResolverEntry::KResolverEntry ( const KResolverEntry &  other  ) 

Copy constructor.

This constructor performs a shallow-copy of the other object.

Definition at line 121 of file kresolver.cpp.

KResolverEntry::~KResolverEntry (  ) 

Destructor.

The destructor frees associated resources with this object. It does not destroy shared data.

Definition at line 128 of file kresolver.cpp.


Member Function Documentation

KSocketAddress KResolverEntry::address (  )  const

Retrieves the socket address associated with this entry.

Definition at line 138 of file kresolver.cpp.

QString KResolverEntry::canonicalName (  )  const

Retrieves the canonical name associated with this entry, if there is any.

If the canonical name was not found, this function returns QString::null.

Definition at line 156 of file kresolver.cpp.

QCString KResolverEntry::encodedName (  )  const

Retrieves the encoded domain name associated with this entry, if there is any.

If this domain has been resolved through DNS, this will be the the ACE-encoded hostname.

Returns a null QCString if such information is not available.

Please note that this information is NOT to be presented to the user, unless requested.

Definition at line 162 of file kresolver.cpp.

int KResolverEntry::family (  )  const

Retrieves the family associated with this socket address.

Definition at line 150 of file kresolver.cpp.

Q_UINT16 KResolverEntry::length (  )  const

Retrieves the length of the socket address structure.

Definition at line 144 of file kresolver.cpp.

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

Assignment operator.

This function copies the contents of the other object into this one. Data will be shared between the two of them.

Definition at line 180 of file kresolver.cpp.

int KResolverEntry::protocol (  )  const

Retrieves the protocol associated with this entry.

Definition at line 174 of file kresolver.cpp.

int KResolverEntry::socketType (  )  const

Retrieves the socket type associated with this entry.

Definition at line 168 of file kresolver.cpp.


The documentation for this class was generated from the following files:
  • kresolver.h
  • kresolver.cpp

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal