Public Member Functions | Public Attributes
Dashel::IPV4Address Class Reference

A IP version 4 address. More...

#include <dashel.h>

List of all members.

Public Member Functions

std::string format (const bool resolveName=true) const
 Return Dashel string form.
std::string hostname () const
 Return the hostname corresponding to the address.
 IPV4Address (unsigned addr=0, unsigned short prt=0)
 Constructor. Numeric argument.
 IPV4Address (const std::string &name, unsigned short port)
 Constructor. String address, do resolution.
bool operator< (const IPV4Address &o) const
 Less than operator.
bool operator== (const IPV4Address &o) const
 Equality operator.

Public Attributes

unsigned address
 IP host address. Stored in local byte order.
unsigned short port
 IP port. Stored in local byte order.

Detailed Description

A IP version 4 address.

Definition at line 194 of file dashel.h.


Constructor & Destructor Documentation

Dashel::IPV4Address::IPV4Address ( unsigned  addr = 0,
unsigned short  prt = 0 
)

Constructor. Numeric argument.

Definition at line 102 of file dashel-common.cpp.

Dashel::IPV4Address::IPV4Address ( const std::string &  name,
unsigned short  port 
)

Constructor. String address, do resolution.

Definition at line 108 of file dashel-common.cpp.


Member Function Documentation

std::string Dashel::IPV4Address::format ( const bool  resolveName = true) const

Return Dashel string form.

Parameters:
resolveNamewhether we should attempt resolving the host name of the address

Definition at line 170 of file dashel-common.cpp.

std::string Dashel::IPV4Address::hostname ( ) const

Return the hostname corresponding to the address.

Definition at line 153 of file dashel-common.cpp.

bool Dashel::IPV4Address::operator< ( const IPV4Address o) const

Less than operator.

Definition at line 148 of file dashel-common.cpp.

bool Dashel::IPV4Address::operator== ( const IPV4Address o) const

Equality operator.

Definition at line 143 of file dashel-common.cpp.


Member Data Documentation

IP host address. Stored in local byte order.

Definition at line 197 of file dashel.h.

unsigned short Dashel::IPV4Address::port

IP port. Stored in local byte order.

Definition at line 198 of file dashel.h.


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


dashel
Author(s): Stéphane Magnenat
autogenerated on Thu Jan 2 2014 11:17:11