- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 45 for ping (0.26 sec)
-
okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt
client.processNextFrame() // Pong. // After 1000ms the client will attempt a ping 2, but we don't process it. That'll cause the // client to fail at 1500ms when it's time to send ping 3 because pong 2 hasn't been received. taskFaker.advanceUntil(ns(1000L)) taskFaker.advanceUntil(ns(1500L)) client.listener.assertFailure( SocketTimeoutException::class.java,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Thu Apr 11 01:59:58 GMT 2024 - 18.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt
* * To differentiate the two cases we ping the server when a stream times out. If the overall * connection is fine the ping will receive a pong; otherwise it won't. * * The deadline to respond to this ping attempts to limit the cost of being wrong. If it is too * long, streams created while we await the pong will reuse broken connections and inevitably
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 32.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt
length: Int, flags: Int, streamId: Int, ) { if (length != 8) throw IOException("TYPE_PING length != 8: $length") if (streamId != 0) throw IOException("TYPE_PING streamId != 0") val payload1 = source.readInt() val payload2 = source.readInt() val ack = flags and FLAG_ACK != 0 handler.ping(ack, payload1, payload2) } @Throws(IOException::class) private fun readGoAway(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 19.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt
sink.writeInt(settings[i]) } sink.flush() } } /** * Send a connection-level ping to the peer. `ack` indicates this is a reply. The data in * `payload1` and `payload2` opaque binary, and there are no rules on the content. */ @Throws(IOException::class) fun ping( ack: Boolean, payload1: Int, payload2: Int, ) { this.withLock {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 11.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt
import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTINUATION import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTROL_CLOSE import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTROL_PING import okhttp3.internal.ws.WebSocketProtocol.OPCODE_CONTROL_PONG import okhttp3.internal.ws.WebSocketProtocol.OPCODE_FLAG_CONTROL import okhttp3.internal.ws.WebSocketProtocol.OPCODE_TEXT import okhttp3.internal.ws.WebSocketProtocol.PAYLOAD_BYTE_MAX
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt
awaitingPong = true } if (failedPing != -1) { failWebSocket( e = SocketTimeoutException( "sent ping but didn't receive pong within " + "${pingIntervalMillis}ms (after ${failedPing - 1} successful ping/pongs)", ), isWriter = true, ) return } try { writer.writePing(ByteString.EMPTY)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 14:21:25 GMT 2024 - 22.1K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt
} @Test fun clientTwoFrameHelloWithPongs() { data.write("010348656c".decodeHex()) // Hel data.write("8a00".decodeHex()) // Pong data.write("8a00".decodeHex()) // Pong data.write("8a00".decodeHex()) // Pong data.write("8a00".decodeHex()) // Pong data.write("80026c6f".decodeHex()) // lo clientReader.processNextFrame() callback.assertPong(EMPTY) callback.assertPong(EMPTY)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 14.4K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt
val settings1 = Settings() settings1[Settings.MAX_CONCURRENT_STREAMS] = maxConcurrentStreams peer.sendFrame().settings(settings1) peer.acceptFrame() // ACK peer.sendFrame().ping(false, 2, 0) peer.acceptFrame() // PING peer.play() // Play it back. val connection = Http2Connection.Builder(true, TaskRunner.INSTANCE) .socket(peer.openSocket())
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 24 04:40:49 GMT 2024 - 12.7K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/WebSocketHttpTest.kt
newWebSocket() clientListener.assertOpen() clientListener.assertFailure( SocketTimeoutException::class.java, "sent ping but didn't receive pong within 500ms (after 0 successful ping/pongs)", ) latch.countDown() val elapsedUntilFailure = System.nanoTime() - openAtNanos assertThat(TimeUnit.NANOSECONDS.toMillis(elapsedUntilFailure).toDouble()) .isCloseTo(1000.0, 250.0) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Mar 31 17:16:15 GMT 2024 - 35.2K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt
} } @Test fun pingRoundTrip() { val expectedPayload1 = 7 val expectedPayload2 = 8 writeMedium(frame, 8) // length frame.writeByte(Http2.TYPE_PING) frame.writeByte(Http2.FLAG_ACK) frame.writeInt(0) // connection-level frame.writeInt(expectedPayload1) frame.writeInt(expectedPayload2) // Check writer sends the same bytes.
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 28.1K bytes - Viewed (0)