Class Poco::Net::HostEntry
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco::Net

# class HostEntry

Library: Net
Package: NetCore
Header: Poco/Net/HostEntry.h

## Description

This class stores information about a host such as host name, alias names and a list of IP addresses.

## Member Summary

Member Functions: addresses, aliases, name, operator =, swap

## Types

### AddressList

typedef std::vector < IPAddress > AddressList;

### AliasList

typedef std::vector < std::string > AliasList;

## Constructors

### HostEntry

HostEntry();

Creates an empty HostEntry.

### HostEntry

HostEntry(
struct hostent * entry
);

Creates the HostEntry from the data in a hostent structure.

### HostEntry

HostEntry(
struct addrinfo * info
);

Creates the HostEntry from the data in an addrinfo structure.

### HostEntry

HostEntry(
const HostEntry & entry
);

Creates the HostEntry by copying another one.

## Destructor

### ~HostEntry

~HostEntry();

Destroys the HostEntry.

## Member Functions

### addresses

const AddressList & addresses() const;

Returns a vector containing the IPAddresses for the host.

### aliases

const AliasList & aliases() const;

Returns a vector containing alias names for the host name.

### name

const std::string & name() const;

Returns the canonical host name.

### operator =

HostEntry & operator = (
const HostEntry & entry
);

Assigns another HostEntry.

### swap

void swap(
HostEntry & hostEntry
);

Swaps the HostEntry with another one.