Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 289 for connection (0.45 sec)

  1. okhttp/src/main/kotlin/okhttp3/Connection.kt

     */
    interface Connection {
      /** Returns the route used by this connection. */
      fun route(): Route
    
      /**
       * Returns the socket that this connection is using. Returns an
       * [SSL socket][javax.net.ssl.SSLSocket] if this connection is HTTPS. If this is an HTTP/2
       * connection the socket may be shared by multiple concurrent calls.
       */
      fun socket(): Socket
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/ConnectionListener.kt

        connection: Connection,
        route: Route,
        call: Call,
      ) {}
    
      /**
       * Invoked when a connection is released as no longer required.
       */
      open fun connectionClosed(connection: Connection) {}
    
      /**
       * Invoked when a call is assigned a particular connection.
       */
      open fun connectionAcquired(
        connection: Connection,
        call: Call,
      ) {}
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt

     *
     *  4. If there's no existing connection, make a list of routes (which may require blocking DNS
     *     lookups) and attempt a new connection them. When failures occur, retries iterate the list of
     *     available routes.
     *
     * If the pool gains an eligible connection while DNS, TCP, or TLS work is in flight, this finder
     * will prefer pooled connections. Only pooled HTTP/2 connections are used for such de-duplication.
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 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/RealRoutePlanner.kt

      }
    
      /**
       * Return the route from [connection] if it should be retried, even if the connection itself is
       * unhealthy. The biggest gotcha here is that we shouldn't reuse routes from coalesced
       * connections.
       */
      private fun retryRoute(connection: RealConnection): Route? {
        return connection.withLock {
          when {
            connection.routeFailureCount != 0 -> null
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 12K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        // which can satisfy a larger policy
        val connection = routePlanner.plans.first().connection
        val http2Connection = connectHttp2(peer, connection, 5)
        setPolicy(pool, address, ConnectionPool.AddressPolicy(5))
        assertThat(pool.connectionCount()).isEqualTo(1)
    
        // Decrease the connection's max so that another connection is needed
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 24 04:40:49 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

          }
        }
        return null
      }
    
      fun put(connection: RealConnection) {
        connection.lock.assertHeld()
    
        connections.add(connection)
    //    connection.queueEvent { connectionListener.connectEnd(connection) }
        scheduleCloser()
      }
    
      /**
       * Notify this pool that [connection] has become idle. Returns true if the connection has been
       * removed from the pool and should be closed.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

         * automatically send ping frames until either the connection fails or it is closed. This keeps
         * the connection alive and may detect connectivity failures.
         *
         * If the server does not respond to each ping with a pong within `interval`, this client will
         * assume that connectivity has been lost. When this happens on a web socket the connection is
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:21:33 GMT 2024
    - 52K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectionUser.kt

      )
    
      fun connectionConnectEnd(
        connection: Connection,
        route: Route,
      )
    
      fun connectFailed(
        route: Route,
        protocol: Protocol?,
        e: IOException,
      )
    
      fun connectionAcquired(connection: Connection)
    
      fun acquireConnectionNoEvents(connection: RealConnection)
    
      fun releaseConnectionNoEvents(): Socket?
    
      fun connectionReleased(connection: Connection)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

        if (pooled3 != null) return pooled3.connection
    
        connection.withLock {
          connectionPool.put(connection)
          user.acquireConnectionNoEvents(connection)
        }
    
        user.connectionAcquired(connection)
        user.connectionConnectionAcquired(connection)
        return connection
      }
    
      override fun trackFailure(
        call: RealCall,
        e: IOException?,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/CallConnectionUser.kt

      override fun connectionConnectEnd(
        connection: Connection,
        route: Route,
      ) {
        poolConnectionListener.connectEnd(connection, route, call)
      }
    
      override fun connectionAcquired(connection: Connection) {
        eventListener.connectionAcquired(call, connection)
      }
    
      override fun acquireConnectionNoEvents(connection: RealConnection) {
        call.acquireConnectionNoEvents(connection)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 3.6K bytes
    - Viewed (0)
Back to top