Library: Net
Package: NetCore
Header: Poco/Net/HostEntry.h
This class stores information about a host such as host name, alias names and a list of IP addresses.
Member Functions: addresses, aliases, name, operator =, swap
typedef std::vector < IPAddress > AddressList;
typedef std::vector < std::string > AliasList;
HostEntry();
Creates an empty HostEntry.
HostEntry(
struct hostent * entry
);
Creates the HostEntry from the data in a hostent structure.
HostEntry(
struct addrinfo * info
);
Creates the HostEntry from the data in an addrinfo structure.
HostEntry(
const HostEntry & entry
);
Creates the HostEntry by copying another one.
~HostEntry();
Destroys the HostEntry.
const AddressList & addresses() const;
Returns a vector containing the IPAddresses for the host.
const AliasList & aliases() const;
Returns a vector containing alias names for the host name.
const std::string & name() const;
Returns the canonical host name.
HostEntry & operator = (
const HostEntry & entry
);
Assigns another HostEntry.
void swap(
HostEntry & hostEntry
);
Swaps the HostEntry with another one.