Class Network
#include <Network.h >
Abstraction of network function calls, plus convenience functions around networking
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
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