iFun Engine API  1.0.0-b5785
Great Technology for Great Games
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
fun::HardwareInfo Class Reference

Class to access hardware information.

#include <hardware_info.h>

Inheritance diagram for fun::HardwareInfo:


struct  NicInfo
 Datastructure to hold IP-capable Network Interface Card (NIC) information. More...

Public Types

enum  FunapiProtocol {
  kTcpPbuf = 0, kTcpJson, kUdpPbuf, kUdpJson,
  kHttpPbuf, kHttpJson, kWebSocketPbuf, kWebSocketJson
typedef std::map< string, const NicInfoNicInfoMap
 NIC name to NIC information mapping.
typedef std::map< FunapiProtocol, uint16_t > ProtocolPortMap

Public Member Functions

 DEPRECATED (static boost::asio::ip::address_v4 GetAwsPublicIpv4())
 Returns a public IP if the server is on AWS. More...

Static Public Member Functions

static const std::vector< NicInfo::AddressMaskPair > & GetAddressList (const std::string &nic_name)
 Returns the ALL IP address for a given NIC.
static std::string GetExternalHostname ()
 Returns an hostname or IP address for the server. More...
static boost::asio::ip::address GetExternalIp ()
 Returns an external IP the server is assigned. More...
static ProtocolPortMap GetExternalPorts ()
 Returns <protocol, port> tuples. More...
static const NicInfoMapGetNicInfo ()
 Returns available NICs. More...

Member Function Documentation


fun::HardwareInfo::DEPRECATED ( static boost::asio::ip::address_v4   GetAwsPublicIpv4())

IP is obtained from gflag "--discover_public_ip_from_aws_instance" must be on.

◆ GetExternalHostname()

static std::string fun::HardwareInfo::GetExternalHostname ( )

The hostname is obatined from the external_ip_resolvers" in MANIFEST.json

◆ GetExternalIp()

static boost::asio::ip::address fun::HardwareInfo::GetExternalIp ( )

The public IP is obtained from the "external_ip_resolvers" in MANIFEST.json or through gflag.

◆ GetExternalPorts()

static ProtocolPortMap fun::HardwareInfo::GetExternalPorts ( )
ProtocolPortMap instance.

◆ GetNicInfo()

static const NicInfoMap& fun::HardwareInfo::GetNicInfo ( )