fgms 0.11.8
The
FlightGear MultiPlayer Server
project
netAddress Class Reference

Socket address, internet style. More...

#include <netSocket.h>

Public Member Functions

 netAddress ()
 
 netAddress (const char *host, int port)
 
bool getBroadcast () const
 
unsigned int getFamily () const
 
const std::string getHost () const
 Create a string object representing an IP address. This is always a string of the form 'dd.dd.dd.dd' (with variable size numbers). More...
 
unsigned int getIP () const
 
unsigned int getPort () const
 Return the port no as int. More...
 
bool operator!= (const netAddress &Value) const
 
void operator= (const netAddress &Value)
 
bool operator== (const netAddress &Value) const
 
void set (const char *host, int port)
 
void setPort (int port)
 

Static Public Member Functions

static const char * getLocalHost ()
 

Private Attributes

unsigned int sin_addr
 
short sin_family
 
unsigned short sin_port
 
char sin_zero [8]
 

Detailed Description

Socket address, internet style.

Definition at line 87 of file netSocket.h.

Constructor & Destructor Documentation

netAddress::netAddress ( )
inline

Definition at line 103 of file netSocket.h.

netAddress::netAddress ( const char *  host,
int  port 
)

Definition at line 67 of file netSocket.cxx.

Member Function Documentation

bool netAddress::getBroadcast ( ) const

Definition at line 173 of file netSocket.cxx.

Referenced by netSocket::connect().

unsigned int netAddress::getFamily ( ) const

Definition at line 146 of file netSocket.cxx.

const string netAddress::getHost ( ) const

Create a string object representing an IP address. This is always a string of the form 'dd.dd.dd.dd' (with variable size numbers).

Definition at line 123 of file netSocket.cxx.

Referenced by FG_SERVER::AddBadClient(), FG_SERVER::AddClient(), FG_SERVER::AddRelay(), FG_CLI::cmd_blacklist_show(), FG_CLI::cmd_crossfeed_show(), FG_CLI::cmd_relay_show(), FG_SERVER::HandlePacket(), FG_SERVER::Init(), FG_SERVER::IsKnownRelay(), FG_SERVER::Loop(), and FG_SERVER::PacketIsValid().

const char * netAddress::getLocalHost ( )
static

Definition at line 151 of file netSocket.cxx.

unsigned int netAddress::getPort ( ) const
bool netAddress::operator!= ( const netAddress Value) const

Definition at line 186 of file netSocket.cxx.

void netAddress::operator= ( const netAddress Value)

Definition at line 194 of file netSocket.cxx.

bool netAddress::operator== ( const netAddress Value) const

Definition at line 178 of file netSocket.cxx.

void netAddress::setPort ( int  port)

Definition at line 113 of file netSocket.cxx.

Referenced by FG_CLI::cmd_crossfeed_add(), and FG_CLI::cmd_relay_add().

Member Data Documentation

unsigned int netAddress::sin_addr
private

Definition at line 98 of file netSocket.h.

Referenced by operator!=(), operator=(), and operator==().

short netAddress::sin_family
private

Definition at line 96 of file netSocket.h.

Referenced by operator!=(), operator=(), and operator==().

unsigned short netAddress::sin_port
private

Definition at line 97 of file netSocket.h.

Referenced by operator=().

char netAddress::sin_zero[8]
private

Definition at line 100 of file netSocket.h.

Referenced by operator=().


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