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

ParameterDescription
hostString representing the host to connect to.
portInteger 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;
 }