• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • KNetwork
  • KResolverEntry
Public Member Functions | List of all members
KNetwork::KResolverEntry Class Reference

#include <k3resolver.h>

Public Member Functions

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

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 thiag.nosp@m.o@kd.nosp@m.e.org
Deprecated:
Use KSocketFactory or KLocalSocket instead

Definition at line 68 of file k3resolver.h.

Constructor & Destructor Documentation

KResolverEntry::KResolverEntry ( )

Default constructor.

Definition at line 92 of file k3resolver.cpp.

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

Constructs a new KResolverEntry from a KSocketAddress and other data.

The KSocketAddress addr parameter will be deep-copied.

Parameters
addrthe address that was resolved
socktypethe socket type of the resolved address
protocolthe protocol of the resolved address
canonNamethe canonical name of the resolved hostname
encodedNamethe ASCII-compatible encoding of the hostname

Definition at line 98 of file k3resolver.cpp.

KResolverEntry::KResolverEntry ( const struct sockaddr *  sa,
quint16  salen,
int  socktype,
int  protocol,
const QString &  canonName = QString(),
const QByteArray &  encodedName = QByteArray() 
)

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

This constructor instead creates an internal KSocketAddress object.

Parameters
sathe sockaddr structure containing the raw address
salenthe length of the sockaddr structure
socktypethe socket type of the resolved address
protocolthe protocol of the resolved address
canonNamethe canonical name of the resolved hostname
encodedNamethe ASCII-compatible encoding of the hostname

Definition at line 110 of file k3resolver.cpp.

KResolverEntry::KResolverEntry ( const KResolverEntry &  other)

Copy constructor.

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

Definition at line 123 of file k3resolver.cpp.

KResolverEntry::~KResolverEntry ( )

Destructor.

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

Definition at line 130 of file k3resolver.cpp.

Member Function Documentation

KSocketAddress KResolverEntry::address ( ) const

Retrieves the socket address associated with this entry.

Definition at line 135 of file k3resolver.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().

Definition at line 153 of file k3resolver.cpp.

QByteArray 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 QByteArray if such information is not available.

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

Definition at line 159 of file k3resolver.cpp.

int KResolverEntry::family ( ) const

Retrieves the family associated with this socket address.

Definition at line 147 of file k3resolver.cpp.

quint16 KResolverEntry::length ( ) const

Retrieves the length of the socket address structure.

Definition at line 141 of file k3resolver.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 177 of file k3resolver.cpp.

int KResolverEntry::protocol ( ) const

Retrieves the protocol associated with this entry.

Definition at line 171 of file k3resolver.cpp.

int KResolverEntry::socketType ( ) const

Retrieves the socket type associated with this entry.

Definition at line 165 of file k3resolver.cpp.


The documentation for this class was generated from the following files:
  • k3resolver.h
  • k3resolver.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:14 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal