1 #ifndef INTERNET_ADDRESS_CLASS
2 #define INTERNET_ADDRESS_CLASS
Provides a dynamically resizable ASCII character string.
A very common template for a dynamic array of bytes.
this type of address describes a destination out on the internet.
machine_uid convert() const
static bool has_ip_address(const basis::astring &to_check, basis::astring &ip_found)
returns true if "to_check" has an IP address in it somewhere.
basis::astring tokenize() const
bool is_nil_address() const
static bool valid_address(const basis::astring &to_check)
basis::abyte address_array[ADDRESS_SIZE]
basis::astring normalize_host() const
basis::astring text_form() const
static basis::astring ip_address_text_form(const basis::byte_array &ip_address)
static const basis::byte_array & localhost()
void fill(const basis::byte_array &ip_address, const basis::astring &host, int port)
static const basis::byte_array & nil_address()
void pack(basis::byte_array &packed_form) const
Creates a packed form of the packable object in "packed_form".
bool operator==(const internet_address &to_compare) const
char hostname[MAXIMUM_HOSTNAME_LENGTH]
bool detokenize(const basis::astring &info)
bool unpack(basis::byte_array &packed_form)
Restores the packable from the "packed_form".
DEFINE_CLASS_NAME("internet_address")
bool is_localhost() const
bool same_host(const base_address &to_compare) const
static bool ip_appropriate_number(const basis::astring &to_check, int indy, basis::astring &accum)
returns true if "to_check" has a number at "indy" that works in ipv4.
virtual int packed_size() const
Estimates the space needed for the packed structure.
bool shareable(const base_address &to_compare) const
static bool is_valid_internet_address(const basis::astring &to_check, basis::byte_array &ip_form, bool &all_zeros)
static bool appropriate_for_ip(const basis::astring &to_check)
internet_address_constraints
@ MAXIMUM_HOSTNAME_LENGTH
bool same_port(const base_address &to_compare) const
base_address * create_copy() const
unsigned char abyte
A fairly important unit which is seldom defined...
Provides access to the operating system's socket methods.