Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for wspolicy (0.15 sec)

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

      fun evictAll() {
        delegate.evictAll()
      }
    
      /**
       * Sets a policy that applies to [address].
       * Overwrites any existing policy for that address.
       */
      @ExperimentalOkHttpApi
      fun setPolicy(
        address: Address,
        policy: AddressPolicy,
      ) {
        delegate.setPolicy(address, policy)
      }
    
      /**
       * A policy for how the pool should treat a specific address.
       */
      class AddressPolicy(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(pool.connectionCount()).isEqualTo(1)
      }
    
      private fun setPolicy(
        pool: RealConnectionPool,
        address: Address,
        policy: ConnectionPool.AddressPolicy,
      ) {
        pool.setPolicy(address, policy)
        taskFaker.runTasks()
      }
    
      private fun evictAllConnections(pool: RealConnectionPool) {
        pool.evictAll()
        assertThat(pool.connectionCount()).isEqualTo(0)
    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)
  3. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

    import okhttp3.internal.commonOnlyIfCached
    import okhttp3.internal.commonParse
    import okhttp3.internal.commonToString
    
    /**
     * A Cache-Control header with cache directives from a server or client. These directives set policy
     * on what responses can be stored, and which requests can be satisfied by those stored responses.
     *
     * See [RFC 7234, 5.2](https://tools.ietf.org/html/rfc7234#section-5.2).
     */
    class CacheControl internal constructor(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectionUser.kt

    import java.net.Socket
    import okhttp3.Connection
    import okhttp3.Handshake
    import okhttp3.HttpUrl
    import okhttp3.Protocol
    import okhttp3.Route
    
    /**
     * The object that is asking for a connection. Either a call or a connect policy from the pool.
     */
    interface ConnectionUser {
      fun addPlanToCancel(connectPlan: ConnectPlan)
    
      fun removePlanToCancel(connectPlan: ConnectPlan)
    
      fun updateRouteDatabaseAfterSuccess(route: Route)
    
    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)
  5. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

    import okhttp3.internal.connection.RealCall
    import okhttp3.internal.connection.RealCall.AsyncCall
    import okhttp3.internal.okHttpName
    import okhttp3.internal.threadFactory
    
    /**
     * Policy on when async requests are executed.
     *
     * Each dispatcher uses an [ExecutorService] to run calls internally. If you supply your own
     * executor, it should be able to run [the configured maximum][maxRequests] number of calls
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 9K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

          val host = route.address.url.host
          if (!Platform.get().isCleartextTrafficPermitted(host)) {
            throw UnknownServiceException(
              "CLEARTEXT communication to $host not permitted by network security policy",
            )
          }
        } else {
          if (Protocol.H2_PRIOR_KNOWLEDGE in route.address.protocols) {
            throw UnknownServiceException("H2_PRIOR_KNOWLEDGE cannot be used with HTTPS")
          }
        }
    
    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)
  7. okhttp/src/main/kotlin/okhttp3/OkHttpClient.kt

          this.routeDatabase = okHttpClient.routeDatabase
          this.taskRunner = okHttpClient.taskRunner
        }
    
        /**
         * Sets the dispatcher used to set policy and execute asynchronous requests. Must not be null.
         */
        fun dispatcher(dispatcher: Dispatcher) =
          apply {
            this.dispatcher = dispatcher
          }
    
        /**
    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. CHANGELOG.md

     *  New: `ConnectionPool.setPolicy()` configures a minimum connection pool size for a target
        address. Use this to proactively open HTTP connections.
    
        Connections opened to fulfill this policy are subject to the connection pool's
        `keepAliveDuration` but do not count against the pool-wide `maxIdleConnections` limit.
    
        This feature increases the client's traffic and the load on the server. Talking to your server's
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 18 01:31:39 GMT 2024
    - 21.4K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        return references.size
      }
    
      /**
       * Adds or replaces the policy for [address].
       * This will trigger a background task to start creating connections as needed.
       */
      fun setPolicy(
        address: Address,
        policy: ConnectionPool.AddressPolicy,
      ) {
        val state = AddressState(address, taskRunner.newQueue(), policy)
        val newConnectionsNeeded: Int
    
        while (true) {
    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)
  10. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            writeHttpResponse(socket, sink, response)
          }
    
          var hasBody = false
          val policy = dispatcher.peek()
          val requestBodySink =
            requestBody.withThrottlingAndSocketPolicy(
              policy = policy,
              disconnectHalfway = policy.socketPolicy == DisconnectDuringRequestBody,
              expectedByteCount = contentLength,
              socket = socket,
            ).buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
Back to top