Class Ping
java.lang.Object
com.squareup.okhttp.internal.spdy.Ping
public final class Ping extends Object
A locally-originated ping.
-
Method Summary
Modifier and Type Method Description longroundTripTime()Returns the round trip time for this ping in nanoseconds, waiting for the response to arrive if necessary.longroundTripTime(long timeout, TimeUnit unit)Returns the round trip time for this ping in nanoseconds, or -1 if the response was cancelled, or -2 if the timeout elapsed before the round trip completed.
-
Method Details
-
roundTripTime
Returns the round trip time for this ping in nanoseconds, waiting for the response to arrive if necessary. Returns -1 if the response was cancelled.- Throws:
InterruptedException
-
roundTripTime
Returns the round trip time for this ping in nanoseconds, or -1 if the response was cancelled, or -2 if the timeout elapsed before the round trip completed.- Throws:
InterruptedException
-