Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for SocketFactory (0.12 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSocketFactory.kt

    import java.io.IOException
    import java.net.InetAddress
    import java.net.Socket
    import javax.net.SocketFactory
    
    /**
     * A [SocketFactory] that delegates calls. Sockets can be configured after creation by
     * overriding [.configureSocket].
     */
    open class DelegatingSocketFactory(private val delegate: SocketFactory) : SocketFactory() {
      @Throws(IOException::class)
      override fun createSocket(): Socket {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/Address.kt

      )
      fun dns(): Dns = dns
    
      @JvmName("-deprecated_socketFactory")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "socketFactory"),
        level = DeprecationLevel.ERROR,
      )
      fun socketFactory(): SocketFactory = socketFactory
    
      @JvmName("-deprecated_proxyAuthenticator")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "proxyAuthenticator"),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  3. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Dec 03 21:33:52 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  4. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/platform/android/AndroidSocketAdapterTest.kt

      }
    
      @ParameterizedTest
      @MethodSource("data")
      fun testCustomSocket(adapter: SocketAdapter) {
        val socketFactory = DelegatingSSLSocketFactory(context.socketFactory)
    
        assertFalse(adapter.matchesSocketFactory(socketFactory))
    
        val sslSocket =
          object : DelegatingSSLSocket(context.socketFactory.createSocket() as SSLSocket) {}
        assertFalse(adapter.matchesSocket(sslSocket))
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

            .writeTimeout(2, SECONDS)
            .readTimeout(2, SECONDS)
            .apply {
              if (socketMode is TlsInstance) {
                if (socketMode.socketMode == Channel) {
                  socketFactory(ChannelSocketFactory())
                }
    
                connectionSpecs(
                  listOf(
                    ConnectionSpec.Builder(ConnectionSpec.COMPATIBLE_TLS)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8K bytes
    - Viewed (0)
  7. 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 Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Apr 02 01:44:15 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/TestValueFactory.kt

        proxy: Proxy? = null,
        proxySelector: ProxySelector = this.proxySelector,
      ): Address {
        return Address(
          uriHost = uriHost,
          uriPort = uriPort,
          dns = dns,
          socketFactory = SocketFactory.getDefault(),
          sslSocketFactory = null,
          hostnameVerifier = null,
          certificatePinner = null,
          proxyAuthenticator = proxyAuthenticator,
          proxy = proxy,
          protocols = protocols,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  9. okhttp/src/test/java/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 {
        return SocketChannel.open().socket()
      }
    
      override fun createSocket(
        host: String,
        port: Int,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. okhttp-tls/src/test/java/okhttp3/tls/HandshakeCertificatesTest.kt

    import java.security.PrivateKey
    import java.util.concurrent.ExecutorService
    import java.util.concurrent.Executors
    import java.util.concurrent.Future
    import javax.net.ServerSocketFactory
    import javax.net.SocketFactory
    import javax.net.ssl.SSLSocket
    import okhttp3.Handshake
    import okhttp3.Handshake.Companion.handshake
    import okhttp3.TestUtil.threadFactory
    import okhttp3.internal.closeQuietly
    import okhttp3.testing.PlatformRule
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Apr 11 22:09:35 UTC 2024
    - 7.1K bytes
    - Viewed (0)
Back to top