Share this page

# LrJposChannel.isConnected

Checks if the client is connected to the server.

`public static boolean isConnected()`

## Return values

This function returns true if the client is connected to the server and false if the client is not connected.

## Example

Copy code

    public int action() throws Throwable {

            if (LrJposChannel.isConnected()){
                lr.output_message("channel is connected");
                //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");
                }
            }
            return 0;
    }

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: