Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for connectTcp (0.23 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/connection/ReusePlan.kt

    package okhttp3.internal.connection
    
    /** Reuse a connection from the pool. */
    internal class ReusePlan(
      val connection: RealConnection,
    ) : RoutePlanner.Plan {
      override val isReady = true
    
      override fun connectTcp() = error("already connected")
    
      override fun connectTlsEtc() = error("already connected")
    
      override fun handleSuccess() = connection
    
      override fun cancel() = error("unexpected cancel")
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/SequentialExchangeFinder.kt

        while (true) {
          if (routePlanner.isCanceled()) throw IOException("Canceled")
    
          try {
            val plan = routePlanner.plan()
    
            if (!plan.isReady) {
              val tcpConnectResult = plan.connectTcp()
              val connectResult =
                when {
                  tcpConnectResult.isSuccess -> plan.connectTlsEtc()
                  else -> tcpConnectResult
                }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt

      /**
       * A plan holds either an immediately-usable connection, or one that must be connected first.
       * These steps are split so callers can call [connectTcp] on a background thread if attempting
       * multiple plans concurrently.
       */
      interface Plan {
        val isReady: Boolean
    
        fun connectTcp(): ConnectResult
    
        fun connectTlsEtc(): ConnectResult
    
        fun handleSuccess(): RealConnection
    
        fun cancel()
    
        /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/FailedPlan.kt

     */
    internal class FailedPlan(e: Throwable) : RoutePlanner.Plan {
      val result = RoutePlanner.ConnectResult(plan = this, throwable = e)
    
      override val isReady = false
    
      override fun connectTcp() = result
    
      override fun connectTlsEtc() = result
    
      override fun handleSuccess() = error("unexpected call")
    
      override fun cancel() = error("unexpected cancel")
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/FakeRoutePlanner.kt

          check(connectTlsNextPlan == null)
          return FakePlan(nextPlanId++)
            .also {
              connectTlsNextPlan = it
            }
        }
    
        override fun connectTcp(): ConnectResult {
          check(connectState == ConnectState.READY)
          events += "plan $id TCP connecting..."
    
          taskFaker.sleep(tcpConnectDelayNanos)
    
          if (yieldBeforeTcpConnectReturns) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

        taskRunner.newQueue().schedule(
          object : Task(taskName) {
            override fun runOnce(): Long {
              val connectResult =
                try {
                  plan.connectTcp()
                } catch (e: Throwable) {
                  ConnectResult(plan, throwable = e)
                }
              // Only post a result if this hasn't since been canceled.
              if (plan in tcpConnectsInFlight) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

          routes = routes,
          attempt = attempt,
          tunnelRequest = tunnelRequest,
          connectionSpecIndex = connectionSpecIndex,
          isTlsFallback = isTlsFallback,
        )
      }
    
      override fun connectTcp(): ConnectResult {
        check(rawSocket == null) { "TCP already connected" }
    
        var success = false
    
        // Tell the call about the connecting call so async cancels work.
        user.addPlanToCancel(this)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  8. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/internal/connection/ConnectPlan;->connectSocket()V
    HSPLokhttp3/internal/connection/ConnectPlan;->connectTcp()Lokhttp3/internal/connection/RoutePlanner$ConnectResult;
    HSPLokhttp3/internal/connection/ConnectPlan;->connectTls(Ljavax/net/ssl/SSLSocket;Lokhttp3/ConnectionSpec;)V
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
Back to top