Yate
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
SrvRecord Class Reference

A SRV record. More...

#include <yateclass.h>

Inheritance diagram for SrvRecord:
DnsRecord GenObject

Public Member Functions

 SrvRecord (int ttl, int prio, int weight, const char *addr, int port)
 
const Stringaddress () const
 
int port () const
 
virtual void dump (String &buf, const char *sep=" ")
 
- Public Member Functions inherited from DnsRecord
 DnsRecord (int ttl, int order, int pref)
 
 DnsRecord ()
 
int ttl () const
 
int order () const
 
int pref () const
 
virtual void dump (String &buf, const char *sep=" ")
 
- Public Member Functions inherited from GenObject
 GenObject ()
 
virtual ~GenObject ()
 
virtual bool alive () const
 
virtual void destruct ()
 
virtual const StringtoString () const
 
virtual const StringtraceId () const
 
virtual void * getObject (const String &name) const
 
NamedCountergetObjCounter () const
 
NamedCountersetObjCounter (NamedCounter *counter)
 

Static Public Member Functions

static void copy (ObjList &dest, const ObjList &src)
 
- Static Public Member Functions inherited from DnsRecord
static bool insert (ObjList &list, DnsRecord *rec, bool ascPref)
 
- Static Public Member Functions inherited from GenObject
static void * getObject (const String &name, const GenObject *obj)
 
static bool getObjCounting ()
 
static void setObjCounting (bool enable)
 
static NamedCountergetObjCounter (const String &name, bool create=true)
 
static ObjListgetObjCounters ()
 

Protected Attributes

String m_address
 
int m_port
 
- Protected Attributes inherited from DnsRecord
int m_ttl
 
int m_order
 
int m_pref
 

Detailed Description

A SRV record.

This class holds a SRV (Service Location) record

Constructor & Destructor Documentation

◆ SrvRecord()

SrvRecord ( int  ttl,
int  prio,
int  weight,
const char *  addr,
int  port 
)
inline

Build a SRV record

Parameters
ttlRecord Time To Live
prioRecord priority (order)
weightRecord weight (preference)
addrRecord address
portRecord port

Member Function Documentation

◆ address()

const String & address ( ) const
inline

Retrieve the record address

Returns
Record address

◆ copy()

static void copy ( ObjList dest,
const ObjList src 
)
static

Copy a SrvRecord list into another one

Parameters
destDestination list
srcSource list

◆ dump()

virtual void dump ( String buf,
const char *  sep = " " 
)
virtual

Dump this record for debug purposes

Parameters
bufDestination buffer
sepFields separator

Reimplemented from DnsRecord.

◆ port()

int port ( ) const
inline

Retrieve the record port

Returns
Record port

The documentation for this class was generated from the following file: