- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 39 for selection (0.41 sec)
-
okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt
val selection2 = routeSelector.next() assertThat(selection2.next()).isEqualTo(regularRoutes[1]) assertThat(selection2.hasNext()).isFalse() // The second selection will contain all failed routes. val selection3 = routeSelector.next() assertThat(selection3.next()).isEqualTo(regularRoutes[0]) assertThat(selection3.hasNext()).isFalse()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 20.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/DoubleInetAddressDns.kt
* limitations under the License. */ package okhttp3.internal import java.net.InetAddress import okhttp3.Dns /** * A network that always resolves two IP addresses per host. Use this when testing route selection * fallbacks to guarantee that a fallback address is available. */ class DoubleInetAddressDns : Dns { override fun lookup(hostname: String): List<InetAddress> { val addresses = Dns.SYSTEM.lookup(hostname)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Dec 23 10:26:25 GMT 2023 - 1K bytes - Viewed (0) -
docs/changelogs/changelog_4x.md
* Fix: Don't track unusable routes beyond their usefulness. We had a bug where we could track certain bad routes indefinitely; now we only track the ones that could be necessary. * Fix: Defer proxy selection until a proxy is required. This saves calls to `ProxySelector` on calls that use a pooled connection. ## Version 4.3.1 _2020-01-07_
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Apr 17 13:25:31 GMT 2024 - 25.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt
*/ operator fun hasNext(): Boolean = hasNextProxy() || postponedRoutes.isNotEmpty() @Throws(IOException::class) operator fun next(): Selection { if (!hasNext()) throw NoSuchElementException() // Compute the next set of routes to attempt. val routes = mutableListOf<Route>() while (hasNextProxy()) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Mar 06 17:33:38 GMT 2024 - 7.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/EventListener.kt
/** * Invoked after proxy selection. * * Note that the list of proxies is never null, but it may be a list containing * only [Proxy.NO_PROXY]. This comes up in several situations: * * * If neither a proxy nor proxy selector is configured. * * If the proxy is configured explicitly as [Proxy.NO_PROXY]. * * If the proxy selector returns only [Proxy.NO_PROXY]. * * If the proxy selector returns an empty list or null. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 15.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt
// If we have a routes left, use 'em. if (routeSelection?.hasNext() == true) return true // If we haven't initialized the route selector yet, assume it'll have at least one route. val localRouteSelector = routeSelector ?: return true // If we do have a route selector, use its routes. return localRouteSelector.hasNext() } /**
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 12K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Route.kt
* [proxy selector][java.net.ProxySelector] is used. It may return multiple proxies to attempt. * * **IP address:** whether connecting directly to an origin server or a proxy, opening a socket * requires an IP address. The DNS server may return multiple IP addresses to attempt. * * Each route is a specific selection of these options. */ class Route(
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.3K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpClientTestRule.kt
return connectionListener.recordedEventTypes() } companion object { /** * A network that resolves only one IP address per host. Use this when testing route selection * fallbacks to prevent the host machine's various IP addresses from interfering. */ private val SINGLE_INET_ADDRESS_DNS = Dns { hostname -> val addresses = Dns.SYSTEM.lookup(hostname)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt
import javax.net.ssl.SSLSocket import okhttp3.Protocol import okhttp3.internal.platform.BouncyCastlePlatform import okhttp3.internal.platform.Platform import org.bouncycastle.jsse.BCSSLSocket /** * Simple non-reflection SocketAdapter for BouncyCastle. */ class BouncyCastleSocketAdapter : SocketAdapter { override fun matchesSocket(sslSocket: SSLSocket): Boolean = sslSocket is BCSSLSocket
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-HostnamesCommon.kt
internal fun inet6AddressToAscii(address: ByteArray): String { // Go through the address looking for the longest run of 0s. Each group is 2-bytes. // A run must be longer than one group (section 4.2.2). // If there are multiple equal runs, the first one must be used (section 4.2.3). var longestRunOffset = -1 var longestRunLength = 0 run { var i = 0 while (i < address.size) { val currentRunOffset = i
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.2K bytes - Viewed (0)