/** * Ping the specified peer, returning true if they replied to the ping within the timeout * specified, false otherwise. This call blocks. * * <p>Uses the ports from the default options. * * <p>TODO There is no way to ping on a subsession. * * @param peer * @param timeoutMs timeout in ms, greater than zero * @return true on success, false on failure * @throws IllegalArgumentException */ public boolean ping(Destination peer, long timeoutMs) { if (timeoutMs <= 0) throw new IllegalArgumentException("bad timeout"); return _connectionManager.ping( peer, _defaultOptions.getLocalPort(), _defaultOptions.getPort(), timeoutMs); }