Share this page

# LrJposChannel.setHost

Defines host details for connecting to the server.

`public static void setHost(String host, int port)`

`public static void setHost(String host)`

## Parameters

Parameter | Description
--- | ---
host | String representing the host to connect to.
port | Integer representing the port to connect to.

## Return values

This function does not return any values.

## Example

Copy code

    public int init() throws Throwable {

            AsciiPackager2003 pack = new AsciiPackager2003();
            LrJposChannel.initChannel(LrJposChannel.ChannelType.ASCIIChannel);
            LrJposChannel.setHost("localhost", 8000);
            LrJposChannel.setPackager(pack);

            return 0;
     }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: