Hello,

I am using the TelnetClient using the threaded reader, and read from the input 
stream upon notification of the TelnetInputListener:

        public void telnetInputAvailable() {
                        InputStream input = telnetClient.getInputStream();
                        try {
                                byte[] data = new byte[input.available()];
                                input.read(data, 0, data.length);
                                System.out.print(new String(data));
                        } catch(IOException e) {
                                e.printStackTrace();
                        }
        }

However, I would like to detect when the client gets disconnected from the 
server (forced disconnect, by timeouts etc). How can I best do this?

Thanks

Reply via email to