Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

synchronized void com::trilead::ssh2::Connection::ping (  ) throws IOException [inline]

This method can be used to perform end-to-end connection testing. It sends a 'ping' message to the server and waits for the 'pong' from the server.

When this method throws an exception, then you can assume that the connection should be abandoned.

Note: Works only after one has passed successfully the authentication step.

Implementation details: this method sends a SSH_MSG_GLOBAL_REQUEST request ('trilead-ping') to the server and waits for the SSH_MSG_REQUEST_FAILURE reply packet from the server.

IOExceptionin case of any problem

Definition at line 1416 of file Connection.java.

            if (tm == null)
                  throw new IllegalStateException("You need to establish a connection first.");

            if (!authenticated)
                  throw new IllegalStateException("The connection is not authenticated.");


Generated by  Doxygen 1.6.0   Back to index