Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for connectionPool (0.06 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. 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)
  3. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              taskRunner = taskRunner,
              connectionPool = connectionPool,
              route = route,
              rawSocket = rawSocket,
              javaNetSocket = javaNetSocket!!,
              handshake = handshake,
              protocol = protocol!!,
              socket = socket,
              pingIntervalMillis = pingIntervalMillis,
              connectionListener = connectionPool.connectionListener,
            )
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 19.3K bytes
    - Viewed (2)
  4. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

          }
      }
    
      @Test
      fun connectionPool() {
        var connectionPool = ConnectionPool()
        connectionPool = ConnectionPool(0, 0L, TimeUnit.SECONDS)
        val idleConnectionCount: Int = connectionPool.idleConnectionCount()
        val connectionCount: Int = connectionPool.connectionCount()
        connectionPool.evictAll()
      }
    
      @Test
      fun connectionSpec() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 47K bytes
    - Viewed (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

          }
        }
    
        return references.size
      }
    
      fun scheduleCloser() {
        cleanupQueue.schedule(cleanupTask)
      }
    
      companion object {
        fun get(connectionPool: ConnectionPool): RealConnectionPool = connectionPool.delegate
      }
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  6. okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt

      internal val taskRunner: TaskRunner = builder.taskRunner ?: TaskRunner.INSTANCE
    
      @get:JvmName("connectionPool")
      val connectionPool: ConnectionPool =
        builder.connectionPool ?: ConnectionPool().also {
          // Cache the pool in the builder so that it will be shared with other clients
          builder.connectionPool = it
        }
    
      constructor() : this(Builder())
    
      init {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Oct 07 21:55:03 UTC 2025
    - 51.4K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealCall.kt

      val originalRequest: Request,
      val forWebSocket: Boolean,
    ) : Call,
      Cloneable,
      Lockable {
      private val connectionPool: RealConnectionPool = client.connectionPool.delegate
    
      @Volatile
      internal var eventListener: EventListener = client.eventListenerFactory.create(this)
    
      private val timeout =
        object : AsyncTimeout() {
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Nov 05 18:28:35 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        uncaughtException
          .also { uncaughtException = null }
    
      fun ensureAllConnectionsReleased() {
        testClient?.let {
          val connectionPool = it.connectionPool
    
          connectionPool.evictAll()
          if (connectionPool.connectionCount() > 0) {
            // Minimise test flakiness due to possible race conditions with connections closing.
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Tue Nov 04 19:13:52 UTC 2025
    - 10.8K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top