Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 475 for protocol (0.26 sec)

  1. okhttp/src/main/kotlin/okhttp3/Protocol.kt

            HTTP_1_0.protocol -> HTTP_1_0
            HTTP_1_1.protocol -> HTTP_1_1
            H2_PRIOR_KNOWLEDGE.protocol -> H2_PRIOR_KNOWLEDGE
            HTTP_2.protocol -> HTTP_2
            SPDY_3.protocol -> SPDY_3
            QUIC.protocol -> QUIC
            else -> {
              // Support HTTP3 draft like h3-29
              if (protocol.startsWith(HTTP_3.protocol)) HTTP_3 else throw IOException("Unexpected protocol: $protocol")
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 06 04:17:33 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  2. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  3. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/DuplexTest.kt

       */
      private fun enableProtocol(protocol: Protocol) {
        enableTls()
        client =
          client.newBuilder()
            .protocols(listOf(protocol, Protocol.HTTP_1_1))
            .build()
        server.protocols = client.protocols
      }
    
      private fun enableTls() {
        client =
          client.newBuilder()
            .sslSocketFactory(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  5. container-tests/src/test/java/okhttp3/containers/BasicProxyTest.kt

          assertThat(response.protocol).isEqualTo(Protocol.HTTP_2)
        }
      }
    
      @Test
      fun testOkHttpSecureProxiedHttp1() {
        testRequest {
          val client =
            OkHttpClient.Builder()
              .trustMockServer()
              .proxy(Proxy(Proxy.Type.HTTP, it.remoteAddress()))
              .protocols(listOf(Protocol.HTTP_1_1))
              .build()
    
          val response =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            connectTls(sslSocket, connectionSpec)
            user.secureConnectEnd(handshake)
          } else {
            socket = rawSocket
            protocol =
              when {
                Protocol.H2_PRIOR_KNOWLEDGE in route.address.protocols -> Protocol.H2_PRIOR_KNOWLEDGE
                else -> Protocol.HTTP_1_1
              }
          }
    
          val connection =
            RealConnection(
              taskRunner = taskRunner,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

              val protocol = peerProtocols[i] as String
              if (protocol in protocols) {
                selected = protocol
                return selected
              }
            }
            selected = protocols[0] // On no intersection, try peer's first protocol.
            return selected
          } else if ((methodName == "protocolSelected" || methodName == "selected") && callArgs.size == 1) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  8. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

          assertThat(acceptedHostName).isEqualTo(hostname)
    
          if (socketMode.tlsExtensionMode == STANDARD) {
            assertThat(response.protocol).isEqualTo(socketMode.protocol)
          } else {
            assertThat(response.protocol).isEqualTo(HTTP_1_1)
          }
        }
      }
    
      companion object {
        @Suppress("unused")
        @JvmStatic
        fun connectionTypes(): List<SocketMode> =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        clientTestRule.recordTaskRunner = true
        return clientTestRule
      }
    
      fun setUp(
        protocol: Protocol,
        server: MockWebServer,
      ) {
        this.server = server
        this.protocol = protocol
        platform.assumeNotOpenJSSE()
        if (protocol === Protocol.HTTP_2) {
          platform.assumeHttp2Support()
          server.useHttps(handshakeCertificates.sslSocketFactory())
          client =
    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)
Back to top