Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for Background (0.22 sec)

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

    import java.net.Socket
    import okhttp3.Connection
    import okhttp3.Handshake
    import okhttp3.HttpUrl
    import okhttp3.Protocol
    import okhttp3.Route
    
    /**
     * A user that is a connection pool creating connections in the background
     * without an intent to immediately use them.
     */
    object PoolConnectionUser : ConnectionUser {
      override fun addPlanToCancel(connectPlan: ConnectPlan) {
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

      val client =
        OkHttpClient.Builder()
          .connectionSpecs(listOf(connectionSpec))
          .eventListenerFactory(eventListenerFactory)
          .build()
    
      fun run() {
        // Launch wireshark in the background
        val process = eventListenerFactory.launchWireShark()
    
        val fbRequest =
          Request.Builder()
            .url("https://graph.facebook.com/robots.txt?s=fb")
            .build()
        val twitterRequest =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

            return 0
          }
        }
    
        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)
    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)
  4. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

     *
     * This cache limits the number of bytes that it will store on the filesystem. When the number of
     * stored bytes exceeds the limit, the cache will remove entries in the background until the limit
     * is satisfied. The limit is not strict: the cache may temporarily exceed it while waiting for
     * files to be deleted. The limit does not include filesystem overhead or the cache journal so
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/FastFallbackExchangeFinder.kt

      private var nextTcpConnectAtNanos = Long.MIN_VALUE
    
      /**
       * Plans currently being connected, and that will later be added to [connectResults]. This is
       * mutated by the call thread only. If is accessed by background connect threads.
       */
      private val tcpConnectsInFlight = CopyOnWriteArrayList<Plan>()
    
      /**
       * Results are posted here as they occur. The find job is done when either one plan completes
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.8K bytes
    - Viewed (0)
  6. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          }
          server.enqueue(MockResponse().setBody("enqueued in the background"))
        }.start()
        val connection = server.url("/").toUrl().openConnection()
        val inputStream = connection.getInputStream()
        val reader = BufferedReader(InputStreamReader(inputStream, StandardCharsets.UTF_8))
        assertThat(reader.readLine()).isEqualTo("enqueued in the background")
      }
    
      @Test
      fun nonHexadecimalChunkSize() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  7. mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt

          server.enqueue(
            MockResponse.Builder()
              .body("enqueued in the background")
              .build(),
          )
        }.start()
        val connection = server.url("/").toUrl().openConnection()
        val reader = BufferedReader(InputStreamReader(connection!!.getInputStream(), UTF_8))
        assertThat(reader.readLine()).isEqualTo("enqueued in the background")
      }
    
      @Test
      fun nonHexadecimalChunkSize() {
        server.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 23.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RoutePlanner.kt

       */
      fun sameHostAndPort(url: HttpUrl): Boolean
    
      /**
       * 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
    
    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)
  9. regression-test/src/androidTest/java/okhttp/regression/LetsEncryptTest.java

    import static org.junit.Assert.fail;
    
    /**
     * Let's Encrypt expiring root test.
     *
     * Read https://community.letsencrypt.org/t/mobile-client-workarounds-for-isrg-issue/137807
     * for background.
     */
    @RunWith(AndroidJUnit4.class)
    public class LetsEncryptTest {
      @Test public void getFailsWithoutAdditionalCert() throws IOException {
        OkHttpClient client = new OkHttpClient();
    
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Nov 17 07:40:31 GMT 2020
    - 6.1K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Cache.kt

       * The initialization time may vary depending on the journal file size and the current actual
       * cache size. The application needs to be aware of calling this function during the
       * initialization phase and preferably in a background worker thread.
       *
       * Note that if the application chooses to not call this method to initialize the cache. By
       * default, OkHttp will perform lazy initialization upon the first usage of the cache.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top