Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

IPaddr Class Reference

#include <netstream.h>


Detailed Description

Definition at line 37 of file netstream.h.

List of all members.

Public Types

typedef std::string ipname_t
typedef unsigned int ipnum_t
typedef unsigned short ipport_t

Public Member Functions

 IPaddr ()
 IPaddr (const ipnum_t &num)
 IPaddr (const ipname_t &name)
 IPaddr (const ipnum_t &num, const ipport_t &port)
 IPaddr (const ipname_t &name, const ipport_t &port)
virtual ~IPaddr ()
virtual bool set_num (const ipnum_t &num)
virtual bool set_name (const ipname_t &name)
virtual bool set_addr (const ipnum_t &num, const ipport_t &port)
virtual bool set_addr (const ipname_t &name, const ipport_t &port)
virtual bool set_port (const ipport_t &port)
virtual ipnum_t get_num () const
virtual const ipname_tget_name () const
virtual ipname_t get_display_num () const
virtual ipname_t get_rname () const
virtual ipport_t get_port () const
virtual bool is_valid ()
virtual const sockaddr_in & get_addr () const
bool operator== (const IPaddr &a) const

Static Public Attributes

static const IPaddr ANY
static const IPaddr BROADCAST
static const unsigned int maxHostNameLen = 256

Protected Member Functions

void Init ()

Protected Attributes

struct sockaddr_in server
ipname_t ipname
ipport_t ipport

Member Typedef Documentation

typedef std::string IPaddr::ipname_t

Definition at line 42 of file netstream.h.

typedef unsigned int IPaddr::ipnum_t

Definition at line 43 of file netstream.h.

typedef unsigned short IPaddr::ipport_t

Definition at line 44 of file netstream.h.


Constructor & Destructor Documentation

IPaddr::IPaddr (  ) 

Definition at line 13 of file netstream.cc.

IPaddr::IPaddr ( const ipnum_t num  )  [explicit]

Definition at line 15 of file netstream.cc.

IPaddr::IPaddr ( const ipname_t name  )  [explicit]

Definition at line 17 of file netstream.cc.

IPaddr::IPaddr ( const ipnum_t num,
const ipport_t port 
)

Definition at line 19 of file netstream.cc.

IPaddr::IPaddr ( const ipname_t name,
const ipport_t port 
)

Definition at line 21 of file netstream.cc.

virtual IPaddr::~IPaddr (  )  [virtual]

Definition at line 52 of file netstream.h.


Member Function Documentation

IPaddr::ipname_t IPaddr::get_display_num (  )  const [virtual]

Definition at line 76 of file netstream.cc.

Referenced by basic_netbuf< charT, traits >::in_sync().

virtual const ipname_t& IPaddr::get_name (  )  const [virtual]

Definition at line 60 of file netstream.h.

virtual ipnum_t IPaddr::get_num (  )  const [virtual]
virtual ipport_t IPaddr::get_port (  )  const [virtual]

Definition at line 63 of file netstream.h.

Referenced by basic_netbuf< charT, traits >::in_sync().

IPaddr::ipname_t IPaddr::get_rname (  )  const [virtual]

Definition at line 84 of file netstream.cc.

void IPaddr::Init (  )  [protected]

Definition at line 95 of file netstream.cc.

Referenced by IPaddr(), set_name(), and set_num().

virtual bool IPaddr::is_valid (  )  [virtual]

Definition at line 65 of file netstream.h.

bool IPaddr::operator== ( const IPaddr a  )  const

Definition at line 69 of file netstream.h.

virtual bool IPaddr::set_addr ( const ipname_t name,
const ipport_t port 
) [virtual]

Definition at line 57 of file netstream.h.

virtual bool IPaddr::set_addr ( const ipnum_t num,
const ipport_t port 
) [virtual]
bool IPaddr::set_name ( const ipname_t name  )  [virtual]

Definition at line 38 of file netstream.cc.

Referenced by IPaddr(), and set_addr().

bool IPaddr::set_num ( const ipnum_t num  )  [virtual]

Definition at line 23 of file netstream.cc.

Referenced by IPaddr(), set_addr(), and set_name().

virtual bool IPaddr::set_port ( const ipport_t port  )  [virtual]

Definition at line 58 of file netstream.h.

Referenced by set_addr(), and set_name().


Member Data Documentation

const IPaddr IPaddr::ANY [static]

Definition at line 39 of file netstream.h.

Referenced by basic_netbuf< charT, traits >::in_sync().

ipname_t IPaddr::ipname [protected]

Definition at line 74 of file netstream.h.

Referenced by get_name(), get_rname(), Init(), set_name(), and set_num().

ipport_t IPaddr::ipport [protected]

Definition at line 75 of file netstream.h.

Referenced by get_port(), set_name(), set_num(), and set_port().

const unsigned int IPaddr::maxHostNameLen = 256 [static]

Definition at line 45 of file netstream.h.

Referenced by get_display_num(), and set_num().

struct sockaddr_in IPaddr::server [protected]

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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:09 2016 by Doxygen 1.6.3