Package com.ngrok

Interface Session.HeartbeatHandler

  • Enclosing interface:
    Session

    public static interface Session.HeartbeatHandler
    Provides a way to monitor current session's heartbeats and disconnects.
    • Method Detail

      • heartbeat

        void heartbeat​(long durationMs)
        Called on each successful heartbeat, with the duration it took to execute it.
        Parameters:
        durationMs - the duration of the heartbeat in milliseconds
      • timeout

        default void timeout()
        Called when session times out (e.g. the heartbeat fails). The session will automatically reconnect, but this gives the application a chance to react.