/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuNetHostname.cpp
Date: 2022-8-16
Author: Reece
***/
#include "Networking.hpp"
#include "AuNetHostname.hpp"
namespace Aurora::IO::Net
{
NetHostname::NetHostname(const AuString &hostname) :
type(EHostnameType::eHostByDns),
hostname(hostname),
address()
}
NetHostname::NetHostname(const IPAddress &ipAddress) :
type(EHostnameType::eHostByIp),
hostname(),
address(ipAddress)
bool NetHostname::operator ==(const NetHostname &other) const
return this->type == other.type &&
this->hostname == other.hostname &&
this->address == other.address;
const AuUInt NetHostname::HashCode() const
return AuHashCode(this->type) ^
AuHashCode(this->hostname) ^
AuHashCode(this->address);