Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for getSelectedProtocol (0.17 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/platform/android/Android10SocketAdapter.kt

      override fun matchesSocket(sslSocket: SSLSocket): Boolean = SSLSockets.isSupportedSocket(sslSocket)
    
      override fun isSupported(): Boolean = Companion.isSupported()
    
      @SuppressLint("NewApi")
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        return try {
          // SSLSocket.getApplicationProtocol returns "" if application protocols values will not
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/platform/Jdk9PlatformTest.kt

          object : DelegatingSSLSocket(null) {
            override fun getApplicationProtocol(): String {
              throw UnsupportedOperationException("Mock exception")
            }
          }
        assertThat(Jdk9Platform().getSelectedProtocol(applicationProtocolUnsupported)).isNull()
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk9Platform.kt

        val names = alpnProtocolNames(protocols)
    
        sslParameters.applicationProtocols = names.toTypedArray()
    
        sslSocket.sslParameters = sslParameters
      }
    
      @SuppressSignatureCheck
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        return try {
          // SSLSocket.getApplicationProtocol returns "" if application protocols values will not
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

            )
          } catch (e: IllegalAccessException) {
            throw AssertionError(e)
          } catch (e: InvocationTargetException) {
            throw AssertionError(e)
          }
        }
      }
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        // No TLS extensions if the socket class is custom.
        if (!matchesSocket(sslSocket)) {
          return null
        }
    
        return try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

          throw AssertionError("failed to remove ALPN", e)
        } catch (e: InvocationTargetException) {
          throw AssertionError("failed to remove ALPN", e)
        }
      }
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        try {
          val provider = Proxy.getInvocationHandler(getMethod.invoke(null, sslSocket)) as AlpnProvider
          if (!provider.unsupported && provider.selected == null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. mockwebserver/src/test/java/mockwebserver3/internal/http2/Http2Server.kt

        while (true) {
          var socket: Socket? = null
          try {
            socket = serverSocket.accept()
            val sslSocket = doSsl(socket)
            val protocolString = Platform.get().getSelectedProtocol(sslSocket)
            val protocol = if (protocolString != null) get(protocolString) else null
            if (protocol != Protocol.HTTP_2) {
              throw ProtocolException("Protocol $protocol unsupported")
            }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.1K bytes
    - Viewed (0)
Back to top