- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 43 for ConnectionPool (0.49 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt
client = OkHttpClient .Builder() .connectionPool(client.connectionPool) .proxy(server.proxyAddress) .build() executeSynchronously("/a").assertBody("abc") client = OkHttpClient .Builder() .connectionPool(client.connectionPool) .proxy(server.proxyAddress) .build()
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 146.6K bytes - Viewed (0) -
okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/TestDohMain.kt
client = bootstrapClient, http2Only = true, workingOnly = true, getOnly = true, ) runBatch(dnsProviders, names) } finally { bootstrapClient.connectionPool.evictAll() bootstrapClient.dispatcher.executorService.shutdownNow() bootstrapClient.cache?.close() }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 3.2K bytes - Viewed (0) -
okhttp/api/android/okhttp.api
public final fun certificatePinner ()Lokhttp3/CertificatePinner; public final fun connectTimeoutMillis ()I public final fun connectionPool ()Lokhttp3/ConnectionPool; public final fun connectionSpecs ()Ljava/util/List; public final fun cookieJar ()Lokhttp3/CookieJar; public final fun dispatcher ()Lokhttp3/Dispatcher; public final fun dns ()Lokhttp3/Dns;
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 16 09:39:51 UTC 2025 - 69.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
val hostnameVerifier = RecordingHostnameVerifier() val cookieJar: CookieJar = JavaNetCookieJar(CookieManager()) val connectionPool = ConnectionPool() client = OkHttpClient .Builder() .cache(cache) .connectionPool(connectionPool) .cookieJar(cookieJar) .sslSocketFactory(clientSocketFactory, handshakeCertificates.trustManager)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Jun 21 20:36:35 UTC 2025 - 133.2K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
builder.eventListenerFactory(LoggingEventListener.Factory(logger)) } return builder.build() } fun close() { val okHttpClient = client as OkHttpClient okHttpClient.connectionPool.evictAll() // Close any persistent connections. okHttpClient.dispatcher.executorService.shutdownNow() } companion object { internal const val NAME = "okcurl"
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 6K bytes - Viewed (0) -
docs/features/connections.md
TCP socket connection. Sharing a connection has substantial performance benefits: lower latency, higher throughput (due to [TCP slow start](https://www.igvita.com/2011/10/20/faster-web-vs-tcp-slow-start/)) and conserved battery. OkHttp uses a [ConnectionPool](https://square.github.io/okhttp/4.x/okhttp/okhttp3/-connection-pool/) that automatically reuses HTTP/1.x connections and multiplexes HTTP/2 connections. In OkHttp some fields of the address come from the URL (scheme, hostname, port)...
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Feb 21 03:33:59 UTC 2022 - 5.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/CertificatePinnerChainValidationTest.kt
) val response1 = call1.execute() assertThat(response1.body.string()).isEqualTo("abc") response1.close() // Force a fresh connection for the next request. client.connectionPool.evictAll() // Confirm that a second request also succeeds. This should detect caching problems. server.enqueue( MockResponse .Builder() .body("def")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 24.3K bytes - Viewed (1) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Connection.kt
writer.windowUpdate(0, (windowSize - DEFAULT_INITIAL_WINDOW_SIZE).toLong()) } } // Thread doesn't use client Dispatcher, since it is scoped potentially across clients via // ConnectionPool. taskRunner.newQueue().execute(name = connectionName, block = readerRunnable) } /** Merges [settings] into this peer's settings and sends them to the remote peer. */ @Throws(IOException::class)
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 31.8K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/EventListenerTest.kt
.build() private var socksProxy: SocksProxy? = null private var cache: Cache? = null @BeforeEach fun setUp() { platform.assumeNotOpenJSSE() listener.forbidLock(get(client.connectionPool)) listener.forbidLock(client.dispatcher) } @AfterEach fun tearDown() { if (socksProxy != null) { socksProxy!!.shutdown() } if (cache != null) {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 60.4K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
val call1 = client.newCall(Request(server.url("/"))) val response = call1.execute() call1.cancel() // That connection is pooled, and it works. assertThat(client.connectionPool.connectionCount()).isEqualTo(1) val call2 = client.newCall(Request(server.url("/"))) val response2 = call2.execute() assertThat(response2.body.string()).isEqualTo("def")
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 73.4K bytes - Viewed (0)