Class Network

Index Home MAE > MAE Architecture > MAE Data Types > Class Index > Class Network

Summary
Public Methods
static int tcpService(service_name, defaultport)
static bool isQuadFormat(addr)
IP htonl()

#include <Network.h >

Summary

Abstraction of network function calls, plus convenience functions around networking

Public Methods

static int tcpService(service_name, defaultport)

const string& service_name

the name of the TCP service

int defaultport

if the service is not found, return this instead


Look up a TCP service by name.  Upon failure, return default port provided.

Return value: 0 on unknown service, server number otherwise service number returned in network format. For human readability, use ntohs() on it

static bool isQuadFormat(addr)

const string& addr

the address to check


Check if address in "1.2.3.4" format

Check to see if a hostname is actually in IP address form.

Return value: true if it is, false if not

IP htonl()