- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 45 for connectionPool (0.15 seconds)
-
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,
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 21:55:03 GMT 2025 - 3.4K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/RealInterceptorChain.kt
} return copy(certificatePinner = newCertificatePinner) } override fun withConnectionPool(connectionPool: ConnectionPool): Interceptor.Chain { check(exchange == null) { "connectionPool can't be adjusted in a network interceptor" } return copy(connectionPool = connectionPool) } override fun call(): Call = call override fun request(): Request = requestCreated: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 12.8K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/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("/"))
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 12.3K bytes - Click Count (1) -
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorOverridesTest.kt
} object ConnectionPoolOverride : Override<ConnectionPool> { override fun Interceptor.Chain.value(): ConnectionPool = connectionPool override fun Interceptor.Chain.withOverride(value: ConnectionPool): Interceptor.Chain = withConnectionPool(value) override fun OkHttpClient.Builder.withOverride(value: ConnectionPool): OkHttpClient.Builder = connectionPool(value)Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 11 02:37:00 GMT 2026 - 28.8K bytes - Click Count (0) -
android-test/src/androidDeviceTest/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())Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Mon Jan 26 07:38:51 GMT 2026 - 2.1K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/Interceptor.kt
/** * Returns the [ConnectionPool] for the OkHttpClient, or an override from the Call.Chain. */ val connectionPool: ConnectionPool /** * Returns a new chain with the specified [ConnectionPool]. */ fun withConnectionPool(connectionPool: ConnectionPool): Chain val eventListener: EventListener }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 8.9K bytes - Click Count (0) -
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 }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 11.1K bytes - Click Count (0) -
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, )Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 19.3K bytes - Click Count (2) -
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() {Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Mar 10 21:47:20 GMT 2026 - 49.7K bytes - Click Count (0) -
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
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Oct 07 21:55:03 GMT 2025 - 8.2K bytes - Click Count (0)