LrJposChannel.getPort

Returns the port used for the connection to the server.

public static int getPort()

Return values

This function returns an integer that represents the connection port.

Example

Copy code
public void getInfo() {
        
        String host = LrJposChannel.getHost();
        int port = LrJposChannel.getPort();
        ISOPackager packager = LrJposChannel.getPackager();
        
        lr.output_message("Channel properties: host - " + host + " port - " + port);
        if (packager != null) {
            lr.output_message("Packager description: " + packager.getDescription());
        }
        else {
            lr.output_message("Packager is not set");
        }
}