Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 40 for ConnectionPool (0.12 sec)

  1. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Apr 03 20:39:41 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        val queue: TaskQueue,
        var policy: ConnectionPool.AddressPolicy,
      ) {
        /**
         * How many calls the pool can carry without opening new connections. This field must only be
         * accessed by the connection closer task.
         */
        var concurrentCallCapacity: Int = 0
      }
    
      companion object {
        fun get(connectionPool: ConnectionPool): RealConnectionPool = connectionPool.delegate
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. okhttp/src/main/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

              taskRunner = taskRunner,
              connectionPool = connectionPool,
              route = route,
              rawSocket = rawSocket,
              socket = socket,
              handshake = handshake,
              protocol = protocol,
              source = source,
              sink = sink,
              pingIntervalMillis = pingIntervalMillis,
              connectionListener = connectionPool.connectionListener,
            )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      val originalRequest: Request,
      val forWebSocket: Boolean,
    ) : Call, Cloneable {
      internal val lock: ReentrantLock = ReentrantLock()
    
      private val connectionPool: RealConnectionPool = client.connectionPool.delegate
    
      internal val eventListener: EventListener = client.eventListenerFactory.create(this)
    
      private val timeout =
        object : AsyncTimeout() {
          override fun timedOut() {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 17.9K bytes
    - Viewed (0)
  6. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt

        if (uncaughtException == null) {
          uncaughtException = throwable
        }
      }
    
      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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jun 22 16:06:35 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        assertConnectionNotReused(request, request)
      }
    
      @Test
      fun connectionsAreNotReusedIfPoolIsSizeZero() {
        client =
          client.newBuilder()
            .connectionPool(ConnectionPool(0, 5, TimeUnit.SECONDS))
            .build()
        server.enqueue(MockResponse(body = "a"))
        server.enqueue(MockResponse(body = "b"))
        val request = Request(server.url("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

        val tunnelRequest =
          when {
            route.requiresTunnel() -> createTunnelRequest(route)
            else -> null
          }
    
        return ConnectPlan(
          taskRunner = taskRunner,
          connectionPool = connectionPool,
          readTimeoutMillis = readTimeoutMillis,
          writeTimeoutMillis = writeTimeoutMillis,
          socketConnectTimeoutMillis = socketConnectTimeoutMillis,
          socketReadTimeoutMillis = socketReadTimeoutMillis,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 12K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/ConnectionCoalescingTest.kt

        assert200Http2Response(execute(url), server.hostName)
        val sanUrl = url.newBuilder().host("san.com").build()
        assert200Http2Response(execute(sanUrl), "san.com")
        assertThat(client.connectionPool.connectionCount()).isEqualTo(1)
      }
    
      /**
       * Test connecting to an alternative host then common name, although only subject alternative
       * names are used if present no special consideration of common name.
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 18.7K bytes
    - Viewed (0)
Back to top