Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 112 for createSocket (0.09 sec)

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

      /** Sets the [real] address for [requested].  */
      operator fun set(
        requested: InetAddress,
        real: InetSocketAddress,
      ) {
        hostMapping[requested] = real
      }
    
      override fun createSocket(): Socket {
        return object : Socket() {
          override fun connect(
            endpoint: SocketAddress?,
            timeout: Int,
          ) {
            val requested = (endpoint as InetSocketAddress)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

            socket?.closeQuietly()
          }
        }
      }
    
      private fun doSsl(socket: Socket): SSLSocket {
        val sslSocket =
          sslSocketFactory.createSocket(
            socket,
            socket.inetAddress.hostAddress,
            socket.port,
            true,
          ) as SSLSocket
        sslSocket.useClientMode = false
    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/FastFallbackTest.kt

          object : DelegatingSocketFactory(SocketFactory.getDefault()) {
            var first = true
    
            override fun createSocket(): Socket {
              if (first) {
                first = false
                firstConnectLatch.await()
              }
              return super.createSocket()
            }
          }
    
        client =
          client.newBuilder()
            .protocols(listOf(Protocol.H2_PRIOR_KNOWLEDGE))
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/OpenJSSETest.kt

            .isInstanceOf<SSLSocketImpl>()
        }
      }
    
      @Test
      fun testSupportedProtocols() {
        val factory = SSLSocketFactoryImpl()
        val s = factory.createSocket() as SSLSocketImpl
    
        assertEquals(listOf("TLSv1.3", "TLSv1.2"), s.enabledProtocols.toList())
      }
    
      @Test
      @Disabled
      fun testMozilla() {
        assumeNetwork()
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/JSSETest.kt

        }
      }
    
      @Test
      fun testSupportedProtocols() {
        val factory = SSLSocketFactory.getDefault()
        assertThat(factory.javaClass.name).isEqualTo("sun.security.ssl.SSLSocketFactoryImpl")
        val s = factory.createSocket() as SSLSocket
    
        when {
          PlatformVersion.majorVersion > 11 ->
            assertThat(s.enabledProtocols.toList()).containsExactly(
              "TLSv1.3",
              "TLSv1.2",
            )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jan 20 10:30:28 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

            }
    
            user.secureConnectStart()
    
            // Create the wrapper over the connected socket.
            val sslSocket =
              route.address.sslSocketFactory.createSocket(
                rawSocket,
                route.address.url.host,
                route.address.url.port,
                // autoClose:
                true,
              ) as SSLSocket
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Apr 20 17:03:43 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

                dispatchBookkeepingRequest(sequenceNumber, raw)
                processHandshakeFailure(raw)
                return
              }
              socket =
                sslSocketFactory!!.createSocket(
                  raw,
                  raw.inetAddress.hostAddress,
                  raw.port,
                  true,
                )
              val sslSocket = socket as SSLSocket
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        val size: Int = formBody.size()
      }
    
      @Test @Disabled
      fun handshake() {
        val handshake: Handshake =
          Handshake.get((localhost().sslSocketFactory().createSocket() as SSLSocket).session)
        val tlsVersion: TlsVersion = handshake.tlsVersion()
        val cipherSuite: CipherSuite = handshake.cipherSuite()
        val peerCertificates: List<Certificate> = handshake.peerCertificates()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        val supportsTlsExtensions: Boolean = connectionSpec.supportsTlsExtensions
        val compatible: Boolean =
          connectionSpec.isCompatible(
            localhost().sslSocketFactory().createSocket() as SSLSocket,
          )
      }
    
      @Test
      fun connectionSpecBuilder() {
        var builder = ConnectionSpec.Builder(ConnectionSpec.MODERN_TLS)
        builder = builder.allEnabledCipherSuites()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        val uselessSocketFactory: SocketFactory =
          object : SocketFactory() {
            override fun createSocket(): Socket {
              throw IllegalArgumentException("useless")
            }
    
            override fun createSocket(
              host: InetAddress,
              port: Int,
            ): Socket? = null
    
            override fun createSocket(
              address: InetAddress,
              port: Int,
              localAddress: InetAddress,
    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