Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 217 for Protocols (0.04 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            connectTls(sslSocket, connectionSpec)
            user.secureConnectEnd(handshake)
          } else {
            javaNetSocket = 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,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val i = HttpLoggingInterceptor()
    
        builder.interceptors().add(i)
        builder.networkInterceptors().add(i)
      }
    
      @Test
      fun protocol() {
        var protocol: Protocol = Protocol.HTTP_2
        protocol = Protocol.get("")
      }
    
      @Test
      fun pushPromise() {
        val pushPromise: PushPromise = PushPromise("", "", headersOf(), MockResponse())
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  3. okhttp/src/commonJvmAndroid/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()
        }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jul 28 07:33:49 UTC 2025
    - 8.1K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/ServerTruncatesRequestTest.kt

          assertThat(response.body.string()).isEqualTo("healthy")
        }
      }
    
      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()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 9.4K bytes
    - Viewed (0)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this attaches a
         * pushed stream to this response.
         */
        public fun addPush(promise: PushPromise): Builder =
          apply {
            this.pushPromises_ += promise
          }
    
        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this pushes
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 17.8K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

       */
      public 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"
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 02 20:36:00 UTC 2025
    - 40.3K bytes
    - Viewed (0)
  7. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/Android10Platform.kt

      }
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        socketAdapters
          .find { it.matchesSocket(sslSocket) }
          ?.configureTlsExtensions(sslSocket, hostname, protocols)
      }
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? =
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jul 20 11:25:50 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  8. okhttp/src/jvmMain/kotlin/okhttp3/internal/platform/ConscryptPlatform.kt

      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<@JvmSuppressWildcards Protocol>,
      ) {
        if (Conscrypt.isConscrypt(sslSocket)) {
          // Enable session tickets.
          Conscrypt.setUseSessionTickets(sslSocket, true)
    
          // Enable ALPN.
          val names = alpnProtocolNames(protocols)
          Conscrypt.setApplicationProtocols(sslSocket, names.toTypedArray())
        } else {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  9. okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

      override fun matchesSocket(sslSocket: SSLSocket): Boolean = sslSocketClass.isInstance(sslSocket)
    
      override fun configureTlsExtensions(
        sslSocket: SSLSocket,
        hostname: String?,
        protocols: List<Protocol>,
      ) {
        // No TLS extensions if the socket class is custom.
        if (matchesSocket(sslSocket)) {
          try {
            // Enable session tickets.
            setUseSessionTickets.invoke(sslSocket, true)
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 4.6K bytes
    - Viewed (0)
  10. docs/changelogs/upgrading_to_okhttp_4.md

    Kotlin does have properties and we take advantage of them in OkHttp.
    
     * **Address**: certificatePinner, connectionSpecs, dns, hostnameVerifier, protocols, proxy,
       proxyAuthenticator, proxySelector, socketFactory, sslSocketFactory, url
     * **Cache**: directory
     * **CacheControl**: immutable, maxAgeSeconds, maxStaleSeconds, minFreshSeconds, mustRevalidate,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
Back to top