• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

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

#include <kresolver.h>

Public Member Functions

 KResolverEntry ()
 
 KResolverEntry (const TDESocketAddress &addr, int socktype, int protocol, const TQString &canonName=TQString::null, const TQCString &encodedName=TQCString())
 
 KResolverEntry (const struct sockaddr *sa, TQ_UINT16 salen, int socktype, int protocol, const TQString &canonName=TQString::null, const TQCString &encodedName=TQCString())
 
 KResolverEntry (const KResolverEntry &other)
 
 ~KResolverEntry ()
 
TDESocketAddress address () const
 
TQ_UINT16 length () const
 
int family () const
 
TQString canonicalName () const
 
TQCString encodedName () const
 
int socketType () const
 
int protocol () const
 
KResolverEntry & operator= (const KResolverEntry &other)
 

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.ma.nosp@m.cieir.nosp@m.a@kd.nosp@m.email.nosp@m..net

Definition at line 66 of file kresolver.h.

Constructor & Destructor Documentation

◆ KResolverEntry() [1/4]

KResolverEntry::KResolverEntry ( )

Default constructor.

Definition at line 94 of file kresolver.cpp.

◆ KResolverEntry() [2/4]

KResolverEntry::KResolverEntry ( const TDESocketAddress &  addr,
int  socktype,
int  protocol,
const TQString &  canonName = TQString::null,
const TQCString &  encodedName = TQCString() 
)

Constructs a new KResolverEntry from a TDESocketAddress and other data.

The TDESocketAddress 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 100 of file kresolver.cpp.

◆ KResolverEntry() [3/4]

KResolverEntry::KResolverEntry ( const struct sockaddr *  sa,
TQ_UINT16  salen,
int  socktype,
int  protocol,
const TQString &  canonName = TQString::null,
const TQCString &  encodedName = TQCString() 
)

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

This constructor instead creates an internal TDESocketAddress 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 112 of file kresolver.cpp.

◆ KResolverEntry() [4/4]

KResolverEntry::KResolverEntry ( const KResolverEntry &  other)

Copy constructor.

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

Definition at line 125 of file kresolver.cpp.

◆ ~KResolverEntry()

KResolverEntry::~KResolverEntry ( )

Destructor.

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

Definition at line 132 of file kresolver.cpp.

Member Function Documentation

◆ address()

TDESocketAddress KResolverEntry::address ( ) const

Retrieves the socket address associated with this entry.

Definition at line 142 of file kresolver.cpp.

◆ canonicalName()

TQString 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 TQString::null.

Definition at line 160 of file kresolver.cpp.

◆ encodedName()

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

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

Definition at line 166 of file kresolver.cpp.

◆ family()

int KResolverEntry::family ( ) const

Retrieves the family associated with this socket address.

Definition at line 154 of file kresolver.cpp.

◆ length()

TQ_UINT16 KResolverEntry::length ( ) const

Retrieves the length of the socket address structure.

Definition at line 148 of file kresolver.cpp.

◆ operator=()

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 184 of file kresolver.cpp.

◆ protocol()

int KResolverEntry::protocol ( ) const

Retrieves the protocol associated with this entry.

Definition at line 178 of file kresolver.cpp.

◆ socketType()

int KResolverEntry::socketType ( ) const

Retrieves the socket type associated with this entry.

Definition at line 172 of file kresolver.cpp.


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

tdecore

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

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.