Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for configureSocket (0.13 sec)

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

    /**
     * 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 {
        val socket = delegate.createSocket()
        return configureSocket(socket)
      }
    
      @Throws(IOException::class)
      override fun createSocket(
        host: String,
    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-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocketFactory.kt

     * overriding [.configureSocket].
     */
    open class DelegatingSSLSocketFactory(private val delegate: SSLSocketFactory) : SSLSocketFactory() {
      @Throws(IOException::class)
      override fun createSocket(): SSLSocket {
        val sslSocket = delegate.createSocket() as SSLSocket
        return configureSocket(sslSocket)
      }
    
      @Throws(IOException::class)
      override fun createSocket(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.8K bytes
    - Viewed (0)
  3. samples/guide/src/main/java/okhttp3/recipes/CustomCipherSuites.java

            Socket socket, String host, int port, boolean autoClose) throws IOException {
          return configureSocket((SSLSocket) delegate.createSocket(socket, host, port, autoClose));
        }
    
        @Override public Socket createSocket(String host, int port) throws IOException {
          return configureSocket((SSLSocket) delegate.createSocket(host, port));
        }
    
        @Override public Socket createSocket(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Thu Mar 14 21:57:42 UTC 2019
    - 6.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/FallbackTestClientSocketFactory.kt

     * reflection-based calls to SSLSocket from Platform.
     */
    class FallbackTestClientSocketFactory(
      delegate: SSLSocketFactory,
    ) : DelegatingSSLSocketFactory(delegate) {
      override fun configureSocket(sslSocket: SSLSocket): SSLSocket = TlsFallbackScsvDisabledSSLSocket(sslSocket)
    
      private class TlsFallbackScsvDisabledSSLSocket(
        socket: SSLSocket,
      ) : DelegatingSSLSocket(socket) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

          }
        client =
          clientTestRule.newClientBuilder()
            .socketFactory(
              object : DelegatingSocketFactory(getDefault()) {
                @Throws(IOException::class)
                override fun configureSocket(socket: Socket): Socket {
                  socket.setSendBufferSize(SOCKET_BUFFER_SIZE)
                  socket.setReceiveBufferSize(SOCKET_BUFFER_SIZE)
                  return socket
                }
              },
            )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. android-test/src/androidTest/java/okhttp/android/test/alpn/AlpnOverrideTest.kt

     * Tests for ALPN overriding on Android.
     */
    @Tag("Remote")
    class AlpnOverrideTest {
      class CustomSSLSocketFactory(
        delegate: SSLSocketFactory,
      ) : DelegatingSSLSocketFactory(delegate) {
        override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            val parameters = sslSocket.sslParameters
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  7. android-test/src/androidTest/java/okhttp/android/test/sni/SniOverrideTest.kt

      fun getWithCustomSocketFactory() {
        assumeTrue(Build.VERSION.SDK_INT >= 24)
    
        class CustomSSLSocketFactory(
          delegate: SSLSocketFactory,
        ) : DelegatingSSLSocketFactory(delegate) {
          override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
            if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
              val parameters = sslSocket.sslParameters
              val sni = parameters.serverNames
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

                  else -> TODO()
                }
    
                val serverSslSocketFactory =
                  object : DelegatingSSLSocketFactory(sslSocketFactory) {
                    override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
                      return sslSocket.apply {
                        sslParameters =
                          sslParameters.apply {
                            sniMatchers =
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/SessionReuseTest.kt

        val systemSslSocketFactory = sslContext.socketFactory
        val sslSocketFactory =
          object : DelegatingSSLSocketFactory(systemSslSocketFactory) {
            override fun configureSocket(sslSocket: SSLSocket): SSLSocket {
              return sslSocket.apply {
                if (reuseSession) {
                  this.enableSessionCreation = false
                }
              }
            }
          }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/http/CancelTest.kt

        client =
          clientTestRule.newClientBuilder()
            .socketFactory(
              object : DelegatingSocketFactory(SocketFactory.getDefault()) {
                @Throws(IOException::class)
                override fun configureSocket(socket: Socket): Socket {
                  socket.sendBufferSize = SOCKET_BUFFER_SIZE
                  socket.receiveBufferSize = SOCKET_BUFFER_SIZE
                  return socket
                }
              },
            )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top