LrJposChannel.sendKeepAlive
Sends a high-level keep-alive message (zero length).
public static void sendKeepAlive() throws IOException
Return values
This function does not return any values.
Example
public int init() throws Throwable {
AsciiPackager2003 pack = new AsciiPackager2003();
LrJposChannel.initChannel(LrJposChannel.ChannelType.ASCIIChannel);
LrJposChannel.setHost("your server's host name");
LrJposChannel.setPort(8000);
LrJposChannel.setPackager(pack);
LrJposChannel.connect();
if (LrJposChannel.isExpectKeepAlive()) {
LrJposChannel.sendKeepAlive();
}
return 0;
}