address resolver for NTCP address

This commit is contained in:
orignal 2015-01-16 15:25:44 -05:00
parent 0f227e8317
commit f3fbf6bd89
3 changed files with 64 additions and 8 deletions

View file

@ -69,6 +69,7 @@ namespace data
{
TransportStyle transportStyle;
boost::asio::ip::address host;
char * addressString;
int port, mtu;
uint64_t date;
uint8_t cost;
@ -76,6 +77,9 @@ namespace data
Tag<32> key; // intro key for SSU
std::vector<Introducer> introducers;
Address (): addressString (nullptr) {};
~Address () { if (addressString) delete[] addressString; };
bool IsCompatible (const boost::asio::ip::address& other) const
{
return (host.is_v4 () && other.is_v4 ()) ||