Support Forum G3D Web Page |
Public Types | |
enum | { DEFAULT_ADAPTER_HOST = 0 } |
Public Member Functions | |
NetAddress (uint32 host, uint16 port=0) | |
In host byte order. More... | |
NetAddress (const String &hostname, uint16 port) | |
More... | |
NetAddress (const String &hostnameAndPort) | |
NetAddress () | |
void | deserialize (class BinaryInput &b) |
String | hostname () const |
Name of this address, without the domain. More... | |
uint32 | ip () const |
Returns a value in host format (i.e., don't worry about endian issues) More... | |
String | ipString () const |
bool | ok () const |
Returns true if this is not an illegal address. More... | |
uint16 | port () const |
void | serialize (class BinaryOutput &b) const |
String | toString () const |
Static Public Member Functions | |
static NetAddress | broadcastAddress (uint16 port) |
Creates a UDP broadcast address for use with a G3D::LightweightConduit. More... | |
static void | localHostAddresses (Array< NetAddress > &array) |
static String | localHostname () |
Name of the local machine machine, without the domain. More... | |
Friends | |
class | LightweightConduit |
class | NetworkDevice |
class | ReliableConduit |
anonymous enum |
In host byte order.
port | Specified in host byte order (i.e., don't worry about endian issues) |
|
explicit |
hostnameAndPort | in the form "hostname:port" or "ip:port" |
G3D::NetAddress::NetAddress | ( | ) |
|
static |
Creates a UDP broadcast address for use with a G3D::LightweightConduit.
UDP broadcast allows one machine to send a packet to all machines on the same local network. The IP portion of the address is 0xFFFFFFFF, which indicates "broadcast" to the underlying socket API. This feature is not available with the connection-based TCP protocol abstracted by G3D::ReliableConduit; use multisend instead.
void G3D::NetAddress::deserialize | ( | class BinaryInput & | b | ) |
String G3D::NetAddress::hostname | ( | ) | const |
Name of this address, without the domain.
Performs reverse DNS lookup on this address. This may make a network connection to a DNS server and block until that communication completes if the address is one that has not been recently checked.
|
inline |
Returns a value in host format (i.e., don't worry about endian issues)
Referenced by HashTrait< G3D::NetAddress >::hashCode(), and G3D::operator==().
String G3D::NetAddress::ipString | ( | ) | const |
|
static |
|
static |
Name of the local machine machine, without the domain.
The value is cached after the first call.
Referenced by G3D::NetServer::create().
bool G3D::NetAddress::ok | ( | ) | const |
Returns true if this is not an illegal address.
|
inline |
Referenced by HashTrait< G3D::NetAddress >::hashCode(), and G3D::operator==().
void G3D::NetAddress::serialize | ( | class BinaryOutput & | b | ) | const |
String G3D::NetAddress::toString | ( | ) | const |
|
friend |
|
friend |
|
friend |