Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 40 for SocketFactory (0.61 sec)

  1. samples/unixdomainsockets/src/main/java/okhttp3/unixdomainsockets/UnixDomainSocketFactory.java

    import java.io.IOException;
    import java.net.InetAddress;
    import java.net.InetSocketAddress;
    import java.net.Socket;
    import javax.net.SocketFactory;
    import jnr.unixsocket.UnixSocketChannel;
    
    /** Impersonate TCP-style SocketFactory over UNIX domain sockets. */
    public final class UnixDomainSocketFactory extends SocketFactory {
      private final File path;
    
      public UnixDomainSocketFactory(File path) {
        this.path = path;
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Dec 03 21:33:52 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  2. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

            val socketFactory = keyStoreFactory.sslContext().socketFactory
    
            val trustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm())
            trustManagerFactory.init(keyStoreFactory.loadOrCreateKeyStore())
            val trustManager = trustManagerFactory.trustManagers.first() as X509TrustManager
    
            sslSocketFactory(socketFactory, trustManager)
          }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/FastFallbackTest.kt

        // Yield the first IP address so the second IP address completes first.
        val firstConnectLatch = CountDownLatch(1)
        val socketFactory =
          object : DelegatingSocketFactory(SocketFactory.getDefault()) {
            var first = true
    
            override fun createSocket(): Socket {
              if (first) {
                first = false
                firstConnectLatch.await()
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Jun 20 11:46:46 UTC 2025
    - 10.4K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/ChannelSocketFactory.kt

     * limitations under the License.
     */
    package okhttp3
    
    import java.net.InetAddress
    import java.net.Socket
    import java.nio.channels.SocketChannel
    import javax.net.SocketFactory
    
    class ChannelSocketFactory : SocketFactory() {
      override fun createSocket(): Socket = SocketChannel.open().socket()
    
      override fun createSocket(
        host: String,
        port: Int,
      ): Socket = TODO("Not yet implemented")
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  5. okhttp/src/jvmTest/kotlin/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 Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 13.4K bytes
    - Viewed (0)
  6. samples/tlssurvey/src/main/kotlin/okhttp3/survey/Clients.kt

        ianaSuites = ianaSuites,
      )
    }
    
    fun systemDefault(
      name: String,
      version: String,
      ianaSuites: IanaSuites,
    ): Client {
      val socketFactory = SSLSocketFactory.getDefault() as SSLSocketFactory
      val sslSocket = socketFactory.createSocket() as SSLSocket
    
      return Client(
        userAgent = name,
        version = version,
        enabled = sslSocket.enabledCipherSuites.map { ianaSuites.fromJavaName(it) },
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 2.4K bytes
    - Viewed (0)
  7. docs/changelogs/upgrading_to_okhttp_4.md

    Kotlin does have properties and we take advantage of them in OkHttp.
    
     * **Address**: certificatePinner, connectionSpecs, dns, hostnameVerifier, protocols, proxy,
       proxyAuthenticator, proxySelector, socketFactory, sslSocketFactory, url
     * **Cache**: directory
     * **CacheControl**: immutable, maxAgeSeconds, maxStaleSeconds, minFreshSeconds, mustRevalidate,
       noCache, noStore, noTransform, onlyIfCached, sMaxAgeSeconds
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  8. okhttp/api/jvm/okhttp.api

    	public final fun -deprecated_socketFactory ()Ljavax/net/SocketFactory;
    	public final fun -deprecated_sslSocketFactory ()Ljavax/net/ssl/SSLSocketFactory;
    	public final fun -deprecated_url ()Lokhttp3/HttpUrl;
    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/SessionReuseTest.kt

            .tlsVersions(tlsVersion)
            .build()
    
        var reuseSession = false
    
        val sslContext = handshakeCertificates.sslContext()
        val systemSslSocketFactory = sslContext.socketFactory
        val sslSocketFactory =
          object : DelegatingSSLSocketFactory(systemSslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket =
              sslSocket.apply {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 6K bytes
    - Viewed (0)
  10. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/CancelTest.kt

          server.useHttps(handshakeCertificates.sslSocketFactory())
        }
        server.start()
    
        client =
          clientTestRule
            .newClientBuilder()
            .socketFactory(
              object : DelegatingSocketFactory(SocketFactory.getDefault()) {
                @Throws(IOException::class)
                override fun configureSocket(socket: Socket): Socket {
                  socket.sendBufferSize = SOCKET_BUFFER_SIZE
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 9.8K bytes
    - Viewed (0)
Back to top