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(
    const HostEntry & entry
);

Creates the HostEntry by copying another one.

Destructor

~HostEntry

~HostEntry();

Destroys the HostEntry.

Member Functions

addresses inline

const AddressList & addresses() const;

Returns a vector containing the IPAddresses for the host.

aliases inline

const AliasList & aliases() const;

Returns a vector containing alias names for the host name.

name inline

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.