LrJposChannel.reconnect
Triggers a disconnect followed by a reconnect.
public static void reconnect() throws IOException
Return values
This function does not return any values.
Example
public void checkConnection() throws Throwable {
if (LrJposChannel.isConnected()) {
lr.output_message("Channel is connected. Triggering reconnect");
LrJposChannel.reconnect();
//send messages
//...
}
else {
lr.output_message("Channel is not connected");
try {
LrJposChannel.connect();
lr.output_message("Channel is now connected");
}catch (Exception ex) {
lr.output_message("Channel cannot connect");
}
}
}