Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 17 for connectionPool (0.27 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/ConnectionPool.kt

     * application. The tuning parameters in this pool are subject to change in future OkHttp releases.
     * Currently this pool holds up to 5 idle connections which will be evicted after 5 minutes of
     * inactivity.
     */
    class ConnectionPool internal constructor(
      internal val delegate: RealConnectionPool,
    ) {
      internal constructor(
        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
        timeUnit: TimeUnit = TimeUnit.MINUTES,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  2. docs/contribute/debug_logging.md

    This logs task enqueues, starts, and finishes.
    
    ```
    [2020-01-01 00:00:00] Q10000 scheduled after   0 µs: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 starting              : OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 run again after 300 s : OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10000 finished run in   1 ms: OkHttp ConnectionPool
    [2020-01-01 00:00:00] Q10001 scheduled after   0 µs: OkHttp squareup.com applyAndAckSettings
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sun Feb 06 16:35:36 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  3. android-test/src/androidTest/java/okhttp/android/test/SingleAndroidTest.kt

      private var client: OkHttpClient =
        OkHttpClient
          .Builder()
          .sslSocketFactory(
            handshakeCertificates.sslSocketFactory(),
            handshakeCertificates.trustManager,
          ).connectionPool(ConnectionPool(0, 1, TimeUnit.SECONDS))
          .build()
    
      private val server =
        MockWebServer()
    
      @Test
      fun testHttpsRequest() {
        server.useHttps(handshakeCertificates.sslSocketFactory())
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Nov 21 12:33:41 UTC 2025
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/SessionReuseTest.kt

        val request = Request(server.url("/"))
    
        client.newCall(request).execute().use { response ->
          assertEquals(200, response.code)
        }
    
        client.connectionPool.evictAll()
        assertEquals(0, client.connectionPool.connectionCount())
    
        // Force reuse. This appears flaky (30% of the time) even though sessions are reused.
        // javax.net.ssl.SSLHandshakeException: No new session is allowed and no existing
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Sat Nov 01 12:18:11 UTC 2025
    - 5.9K bytes
    - Viewed (1)
  5. okhttp/src/jvmTest/kotlin/okhttp3/ConnectionListenerTest.kt

      private var client: OkHttpClient =
        clientTestRule
          .newClientBuilder()
          .connectionPool(ConnectionPool(connectionListener = listener))
          .fastFallback(fastFallback)
          .build()
    
      @BeforeEach
      fun setUp() {
        platform.assumeNotOpenJSSE()
        platform.assumeNotBouncyCastle()
        listener.forbidLock(get(client.connectionPool))
        listener.forbidLock(client.dispatcher)
      }
    
      @Test
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 18:33:48 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/connection/ConnectionPoolTest.kt

      }
    
      @Test fun inUseConnectionsNotEvicted() {
        val pool = factory.newConnectionPool()
        val poolApi = ConnectionPool(pool)
        val c1 = factory.newConnection(pool, routeA1, 50L)
        val client =
          OkHttpClient
            .Builder()
            .connectionPool(poolApi)
            .build()
        val call = client.newCall(Request(addressA.url)) as RealCall
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  7. okhttp/src/jvmTest/kotlin/okhttp3/JSSETest.kt

          assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
          assertThat(it.handshake!!.tlsVersion).isEqualTo(TlsVersion.TLS_1_3)
        }
    
        client.connectionPool.evictAll()
        assertEquals(0, client.connectionPool.connectionCount())
    
        client.newCall(request).execute().use {
          assertThat(it.protocol).isEqualTo(Protocol.HTTP_2)
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 5.5K bytes
    - Viewed (0)
  8. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/ExternalHttp2Example.kt

              .source()
              .readUtf8Line()
              .also { line = it } != null
          ) {
            println(line)
          }
        } finally {
          response.body.close()
        }
        client.connectionPool.evictAll()
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  9. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/internal.kt

    internal fun OkHttpClient.Builder.taskRunnerInternal(taskRunner: TaskRunner) = this.taskRunner(taskRunner)
    
    internal fun buildConnectionPool(
      connectionListener: ConnectionListener,
      taskRunner: TaskRunner,
    ): ConnectionPool =
      ConnectionPool(
        connectionListener = connectionListener,
        taskRunner = taskRunner,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri May 30 21:28:20 UTC 2025
    - 3.7K bytes
    - Viewed (0)
  10. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

      ): RealRoutePlanner {
        val call = RealCall(client, Request(address.url), forWebSocket = false)
        val chain = newChain(call)
        return RealRoutePlanner(
          taskRunner = client.taskRunner,
          connectionPool = client.connectionPool.delegate,
          readTimeoutMillis = client.readTimeoutMillis,
          writeTimeoutMillis = client.writeTimeoutMillis,
          socketConnectTimeoutMillis = chain.connectTimeoutMillis,
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 6.7K bytes
    - Viewed (0)
Back to top