LrJposChannel.getSoLingerSeconds

Gets the number of seconds set for the SoLinger option (LrJposChannel.setSoLinger).

public static int getSoLingerSeconds()

Return values

This function returns an integer that represents the number of seconds set for the SoLinger option.

Example

Copy code
public void soLinger() {
        
        if (LrJposChannel.isSoLingerOn()) {
            int sec = LrJposChannel.getSoLingerSeconds();
            lr.output_message("SoLinger option is ON and set for " + sec + " seconds");
        }
        else {
            LrJposChannel.setSoLinger(true, 3);
            lr.output_message("SoLinger option is OFF");
        }
}