# zPocketScript Class Reference: Host

## Prototype: Object

## Library: libjs_net

The Host object provides encapsulation of internet host names, mainly to provide a simple interface for DNS lookups. Host objects can be used with Socket objects to bring up TCP connections.
eg.
`var server=new Host("angela1.data-uncertain.co.uk");`

NOTE:The Host object is a seperate plugin library, not part of the core library.

## Methods

- Host(String hostname) - construct a new host.
  Parameters:
  - A String object containing the hostname. This will trigger an automatic DNS lookup to resolve the host.

## Properties

- ip - The resolved IP address of the Host. This is an array of 4 integers, where the resolved IP address is `ip[0].ip[1].ip[2].ip[3]`
- name - The hostname of the Host, as passed on construction.

## Constants