Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 40 for socketFactory (0.08 sec)

  1. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        factory.close()
      }
    
      @Test
      fun address() {
        val address: Address = factory.newAddress()
        val url: HttpUrl = address.url
        val dns: Dns = address.dns
        val socketFactory: SocketFactory = address.socketFactory
        val proxyAuthenticator: Authenticator = address.proxyAuthenticator
        val protocols: List<Protocol> = address.protocols
        val connectionSpecs: List<ConnectionSpec> = address.connectionSpecs
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

            println("Usage: Http2Server <base directory>")
            return
          }
          val server =
            Http2Server(
              File(args[0]),
              localhost().sslContext().socketFactory,
            )
          server.run()
        }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/OkHttpClientTest.kt

      }
    
      @Test fun sslSocketFactorySetAsSocketFactory() {
        val builder = OkHttpClient.Builder()
        assertFailsWith<IllegalArgumentException> {
          builder.socketFactory(SSLSocketFactory.getDefault())
        }
      }
    
      @Test fun noSslSocketFactoryConfigured() {
        val client =
          OkHttpClient.Builder()
            .connectionSpecs(listOf(ConnectionSpec.CLEARTEXT))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 13.2K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/SpecificHostSocketFactory.kt

     */
    package okhttp3
    
    import java.net.InetAddress
    import java.net.InetSocketAddress
    import java.net.Socket
    import java.net.SocketAddress
    import okhttp3.internal.platform.Platform
    
    /**
     * A [SocketFactory] that redirects connections to [defaultAddress] or specific overridden address via [set].
     */
    class SpecificHostSocketFactory(
      val defaultAddress: InetSocketAddress?,
    ) : DelegatingSocketFactory(getDefault()) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      open fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        try {
          return newSSLContext().apply {
            init(null, arrayOf<TrustManager>(trustManager), null)
          }.socketFactory
        } catch (e: GeneralSecurityException) {
          throw AssertionError("No System TLS: $e", e) // The system has no TLS. Just give up.
        }
      }
    
      override fun toString(): String = javaClass.simpleName
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 9.8K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

              serverSocket.setReceiveBufferSize(SOCKET_BUFFER_SIZE)
              return serverSocket
            }
          }
        client =
          clientTestRule.newClientBuilder()
            .socketFactory(
              object : DelegatingSocketFactory(getDefault()) {
                @Throws(IOException::class)
                override fun configureSocket(socket: Socket): Socket {
                  socket.setSendBufferSize(SOCKET_BUFFER_SIZE)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  7. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/ClientAndServer.java

        server.setProtocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE));
        server.enqueue(new MockResponse().setBody("hello"));
        server.start();
    
        OkHttpClient client = new OkHttpClient.Builder()
            .socketFactory(new UnixDomainSocketFactory(socketFile))
            .protocols(Collections.singletonList(Protocol.H2_PRIOR_KNOWLEDGE))
            .build();
    
        Request request = new Request.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Dec 24 03:46:30 UTC 2018
    - 2.1K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/YubikeyClientAuth.kt

        val sslContext = SSLContext.getInstance("TLS")
        sslContext.init(arrayOf(keyManager), arrayOf(trustManager), SecureRandom())
    
        val client =
          OkHttpClient.Builder()
            .sslSocketFactory(sslContext.socketFactory, trustManager)
            .build()
    
        // An example test URL that returns client certificate details.
        val request =
          Request.Builder()
            .url("https://prod.idrix.eu/secure/")
            .build()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  9. android-test/src/androidTest/java/okhttp/android/test/OkHttpTest.kt

          }
    
        val sslContext =
          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }
        val sslSocketFactory = sslContext.socketFactory
    
        val hostnameVerifier = HostnameVerifier { _, _ -> true }
    
        client =
          client.newBuilder()
            .sslSocketFactory(sslSocketFactory, trustManager)
            .hostnameVerifier(hostnameVerifier)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 27K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        }
        server.enqueue(MockResponse())
        client =
          client.newBuilder()
            .socketFactory(uselessSocketFactory)
            .build()
        assertFailsWith<IllegalArgumentException> {
          getResponse(newRequest("/"))
        }
        client =
          client.newBuilder()
            .socketFactory(SocketFactory.getDefault())
            .build()
        val response = getResponse(newRequest("/"))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 131.7K bytes
    - Viewed (0)
Back to top