Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for keepAliveDuration (0.26 sec)

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

        maxIdleConnections: Int = 5,
        keepAliveDuration: Long = 5,
        timeUnit: TimeUnit = TimeUnit.MINUTES,
        taskRunner: TaskRunner = TaskRunner.INSTANCE,
        connectionListener: ConnectionListener = ConnectionListener.NONE,
      ) : this(
        RealConnectionPool(
          taskRunner = taskRunner,
          maxIdleConnections = maxIdleConnections,
          keepAliveDuration = keepAliveDuration,
          timeUnit = timeUnit,
    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. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

       */
      private val connections = ConcurrentLinkedQueue<RealConnection>()
    
      init {
        // Put a floor on the keep alive duration, otherwise cleanup will spin loop.
        require(keepAliveDuration > 0L) { "keepAliveDuration <= 0: $keepAliveDuration" }
      }
    
      fun idleConnectionCount(): Int =
        connections.count {
          it.withLock { it.calls.isEmpty() }
        }
    
      fun connectionCount(): Int = connections.size
    
      /**
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 11.1K bytes
    - Viewed (0)
  3. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        maxIdleConnections: Int = Int.MAX_VALUE,
      ): RealConnectionPool =
        RealConnectionPool(
          taskRunner = taskRunner,
          maxIdleConnections = maxIdleConnections,
          keepAliveDuration = 100L,
          timeUnit = TimeUnit.NANOSECONDS,
          connectionListener = ConnectionListener.NONE,
        )
    
      /** Returns an address that's without an SSL socket factory or hostname verifier.  */
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Wed Oct 08 03:50:05 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  4. CHANGELOG.md

        address. Use this to proactively open HTTP connections.
    
        Connections opened to fulfill this policy are subject to the connection pool's
        `keepAliveDuration` but do not count against the pool-wide `maxIdleConnections` limit.
    
        This feature increases the client's traffic and the load on the server. Talking to your server's
        operators before adopting it.
    
    Registered: Fri Dec 26 11:42:13 UTC 2025
    - Last Modified: Fri Dec 05 16:02:59 UTC 2025
    - 36.2K bytes
    - Viewed (2)
Back to top