Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for ProxySelector (0.05 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/CallKotlinTest.kt

      @Test fun connectExceptionsAreReturnedAsSuppressed() {
        val proxySelector = RecordingProxySelector()
        proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, TestUtil.UNREACHABLE_ADDRESS_IPV4))
        proxySelector.proxies.add(Proxy.NO_PROXY)
        server.close()
    
        client =
          client
            .newBuilder()
            .proxySelector(proxySelector)
            .readTimeout(Duration.ofMillis(100))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 8.4K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/OkHttpClientTest.kt

            .Builder()
            .proxySelector(FakeProxySelector())
            .build()
        assertThat(client.proxy).isNull()
        assertThat(client.proxySelector)
          .isInstanceOf(FakeProxySelector::class.java)
      }
    
      @Test fun sharesRouteDatabase() {
        val client =
          OkHttpClient
            .Builder()
            .build()
        val proxySelector: ProxySelector =
          object : ProxySelector() {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/SocksProxyTest.kt

        // The HTTP calls should share a single connection.
        assertThat(socksProxy.connectionCount()).isEqualTo(1)
      }
    
      @Test
      fun proxySelector() {
        server.enqueue(MockResponse.Builder().body("abc").build())
        val proxySelector: ProxySelector =
          object : ProxySelector() {
            override fun select(uri: URI) = listOf(socksProxy.proxy())
    
            override fun connectFailed(
              uri: URI,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt

      fun proxyMoveTest(cleanClose: Boolean) {
        // Define a single Proxy at myproxy:8008 that will artificially move during the test
        val proxySelector = RecordingProxySelector()
        val socketAddress = InetSocketAddress.createUnresolved("myproxy", 8008)
        proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, socketAddress))
    
        // Define two host names for the DNS routing of fake proxy servers
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt

        val proxyAuthenticator: Authenticator = address.proxyAuthenticator
        val protocols: List<Protocol> = address.protocols
        val connectionSpecs: List<ConnectionSpec> = address.connectionSpecs
        val proxySelector: ProxySelector = address.proxySelector
        val sslSocketFactory: SSLSocketFactory? = address.sslSocketFactory
        val hostnameVerifier: HostnameVerifier? = address.hostnameVerifier
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
  6. okhttp/api/jvm/okhttp.api

    	public final fun protocols ()Ljava/util/List;
    	public final fun proxy ()Ljava/net/Proxy;
    	public final fun proxyAuthenticator ()Lokhttp3/Authenticator;
    	public final fun proxySelector ()Ljava/net/ProxySelector;
    	public final fun socketFactory ()Ljavax/net/SocketFactory;
    	public final fun sslSocketFactory ()Ljavax/net/ssl/SSLSocketFactory;
    	public fun toString ()Ljava/lang/String;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  7. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/connection/ConnectPlan.kt

          success = true
          return ConnectResult(plan = this)
        } catch (e: IOException) {
          // If we used the ProxySelector, and got a IOException during connect, report the failure.
          if (route.address.proxy == null && route.proxy.type() != Proxy.Type.DIRECT) {
            route.address.proxySelector.connectFailed(
              route.address.url.toUri(),
              route.proxy.address(),
              e,
            )
          }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 18.6K bytes
    - Viewed (0)
  8. okhttp/api/android/okhttp.api

    	public final fun protocols ()Ljava/util/List;
    	public final fun proxy ()Ljava/net/Proxy;
    	public final fun proxyAuthenticator ()Lokhttp3/Authenticator;
    	public final fun proxySelector ()Ljava/net/ProxySelector;
    	public final fun socketFactory ()Ljavax/net/SocketFactory;
    	public final fun sslSocketFactory ()Ljavax/net/ssl/SSLSocketFactory;
    	public fun toString ()Ljava/lang/String;
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Aug 16 09:39:51 UTC 2025
    - 69.4K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/CallTest.kt

      fun connectTimeoutsAttemptsAlternateRoute() {
        val proxySelector = RecordingProxySelector()
        proxySelector.proxies.add(Proxy(Proxy.Type.HTTP, TestUtil.UNREACHABLE_ADDRESS_IPV4))
        proxySelector.proxies.add(server.proxyAddress)
        server.enqueue(MockResponse(body = "success!"))
        client =
          client
            .newBuilder()
            .proxySelector(proxySelector)
            .readTimeout(Duration.ofMillis(100))
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 146.6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt

          MockResponse(body = "response 1"),
        )
        server.enqueue(
          MockResponse(code = 407),
        )
        client =
          client
            .newBuilder()
            .proxySelector(
              object : ProxySelector() {
                override fun select(uri: URI): List<Proxy> = listOf(server.proxyAddress)
    
                override fun connectFailed(
                  uri: URI,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 133.2K bytes
    - Viewed (0)
Back to top