Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 208 for Protocols (0.2 sec)

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

          OkHttpClient.Builder()
            .protocols(protocols as List<Protocol>)
        }.also { expected ->
          assertThat(expected.message).isEqualTo("protocols must not contain null")
        }
      }
    
      @Test fun spdy3IsRemovedFromProtocols() {
        val protocols =
          mutableListOf(
            Protocol.HTTP_1_1,
            Protocol.SPDY_3,
          )
        val client =
          OkHttpClient.Builder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

         * Returns the concatenation of 8-bit, length prefixed protocol names.
         * http://tools.ietf.org/html/draft-agl-tls-nextprotoneg-04#page-4
         */
        fun concatLengthPrefixed(protocols: List<Protocol>): ByteArray {
          val result = Buffer()
          for (protocol in alpnProtocolNames(protocols)) {
            result.writeByte(protocol.length)
            result.writeUtf8(protocol)
          }
          return result.readByteArray()
        }
    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 (1)
  3. okhttp/src/test/java/okhttp3/RouteFailureTest.kt

          .assertSuccessful()
          .assertCode(200)
      }
    
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server1.protocols = client.protocols
        server2.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  4. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

      }
    
      @Test
      fun testH2PriorKnowledgeServerFallback() {
        try {
          server.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE, Protocol.HTTP_1_1)
          fail<Unit>()
        } catch (expected: IllegalArgumentException) {
          assertThat(expected.message).isEqualTo(
            "protocols containing h2_prior_knowledge cannot use other protocols: " +
              "[h2_prior_knowledge, http/1.1]",
          )
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  5. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

      }
    
      @Test
      fun testH2PriorKnowledgeServerFallback() {
        try {
          server.protocols = Arrays.asList(Protocol.H2_PRIOR_KNOWLEDGE, Protocol.HTTP_1_1)
          fail<Any>()
        } catch (expected: IllegalArgumentException) {
          assertThat(expected.message).isEqualTo(
            "protocols containing h2_prior_knowledge cannot use other protocols: " +
              "[h2_prior_knowledge, http/1.1]",
          )
        }
      }
    
      @Test
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

          response!!.closeQuietly()
        }
      }
    
      private fun enableHttps() {
        enableHttpsAndAlpn(Protocol.HTTP_1_1)
      }
    
      private fun enableHttp2() {
        platform.assumeHttp2Support()
        enableHttpsAndAlpn(Protocol.HTTP_2, Protocol.HTTP_1_1)
      }
    
      private fun enableHttpsAndAlpn(vararg protocols: Protocol) {
        client =
          client.newBuilder()
            .sslSocketFactory(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

        }
    
        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this attaches a
         * pushed stream to this response.
         */
        fun addPush(promise: PushPromise) =
          apply {
            this.pushPromises += promise
          }
    
        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this pushes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  8. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val dns: Dns = address.dns()
        val socketFactory: SocketFactory = address.socketFactory()
        val proxyAuthenticator: Authenticator = address.proxyAuthenticator()
        val protocols: List<Protocol> = address.protocols()
        val connectionSpecs: List<ConnectionSpec> = address.connectionSpecs()
        val proxySelector: ProxySelector = address.proxySelector()
        val proxy: Proxy? = address.proxy()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

       */
      var protocols: List<Protocol> = immutableListOf(Protocol.HTTP_2, Protocol.HTTP_1_1)
        set(value) {
          val protocolList = value.toImmutableList()
          require(Protocol.H2_PRIOR_KNOWLEDGE !in protocolList || protocolList.size == 1) {
            "protocols containing h2_prior_knowledge cannot use other protocols: $protocolList"
          }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/FastFallbackTest.kt

        dnsResults =
          listOf(
            localhostIpv4,
            localhostIpv6,
            TestUtil.UNREACHABLE_ADDRESS_IPV4.address,
          )
        serverIpv4.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE)
        serverIpv6.protocols = listOf(Protocol.H2_PRIOR_KNOWLEDGE)
    
        // Yield the first IP address so the second IP address completes first.
        val firstConnectLatch = CountDownLatch(1)
        val socketFactory =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.3K bytes
    - Viewed (0)
Back to top