Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for reply (0.17 sec)

  1. okhttp/src/test/java/okhttp3/SocksProxy.kt

            if (localAddress.size != 4) {
              throw ProtocolException("unexpected address: " + toSocket.localAddress)
            }
    
            // Write the reply.
            fromSink.writeByte(VERSION_5)
            fromSink.writeByte(REPLY_SUCCEEDED)
            fromSink.writeByte(0)
            fromSink.writeByte(ADDRESS_TYPE_IPV4)
            fromSink.write(localAddress)
            fromSink.writeShort(toSocket.localPort)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          } catch (e: IOException) {
            failConnection(e)
          }
        }
      }
    
      fun writePing(
        reply: Boolean,
        payload1: Int,
        payload2: Int,
      ) {
        try {
          writer.ping(reply, payload1, payload2)
        } catch (e: IOException) {
          failConnection(e)
        }
      }
    
      /** For testing: sends a ping and waits for a pong. */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.listener.assertFailure()
      }
    
      @Test
      fun protocolErrorInCloseResponseClosesConnection() {
        client.webSocket!!.close(1000, "Hello")
        server.processNextFrame()
        // Not closed until close reply is received.
        assertThat(client.closed).isFalse()
    
        // Manually write an invalid masked close frame.
        server.sink.write("888760b420bb635c68de0cd84f".decodeHex()).emit()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

              }
            sink.writeShort(id)
            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,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

      private var receivedPingCount = 0
    
      /** Total number of pongs received by this web socket. */
      private var receivedPongCount = 0
    
      /** True if we have sent a ping that is still awaiting a reply. */
      private var awaitingPong = false
    
      init {
        require("GET" == originalRequest.method) {
          "Request must be GET: ${originalRequest.method}"
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            throw errorException ?: StreamResetException(errorCode!!)
          }
          throw IllegalStateException("too early; can't read the trailers yet")
        }
      }
    
      /**
       * Sends a reply to an incoming stream.
       *
       * @param outFinished true to eagerly finish the output stream to send data to the remote peer.
       *     Corresponds to `FLAG_FIN`.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

         * Read a connection-level ping from the peer. `ack` indicates this is a reply. The data
         * in `payload1` and `payload2` opaque binary, and there are no rules on the content.
         */
        fun ping(
          ack: Boolean,
          payload1: Int,
          payload2: Int,
        )
    
        /**
         * The peer tells us to stop creating streams. It is safe to replay streams with
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        assertContent("A", getResponse(newRequest("/a")))
    
        // Give the server time to disconnect.
        Thread.sleep(500)
    
        // If the request body is larger than OkHttp's replay buffer, the failure may still occur.
        val requestBodyChars = CharArray(requestSize)
        Arrays.fill(requestBodyChars, 'x')
        val requestBody = String(requestBodyChars)
        for (j in 0..1) {
          try {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val response = call.execute()
        assertThat(response.body.string()).isEqualTo("ABC")
        assertThat(response.protocol).isEqualTo(protocol)
    
        // Confirm a single ping was sent and received, and its reply was sent and received.
        val logs = testLogHandler.takeAll()
        assertThat(countFrames(logs, "FINE: >> 0x00000000     8 PING          "))
          .isEqualTo(1)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  10. docs/changelogs/changelog_3x.md

        sockets and HTTP/2 connections.**
    
        Previously if you configured a ping interval that would cause OkHttp to send
        pings, but it did not track whether the reply pongs were received. With this
        update OkHttp requires that every ping receive a response: if it does not
        the connection will be closed and the listener's `onFailure()` method will
        be called.
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Feb 06 14:55:54 GMT 2022
    - 50.8K bytes
    - Viewed (0)
Back to top