Share this page

# LrJposChannel.setPort

Sets the port to use for the connection to the server.

`public static void setPort (int port)`

## Parameters

- port: An integer that represents 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");
            LrJposChannel.setPort(8000);
            LrJposChannel.setPackager(pack);
            LrJposChannel.connect();

            return 0;
     }

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