Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 22 for exists (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt

    internal fun EventListener.asFactory() = EventListener.Factory { this }
    
    /**
     * Reads until this is exhausted or the deadline has been reached. This is careful to not extend the
     * deadline if one exists already.
     */
    @Throws(IOException::class)
    internal fun Source.skipAll(
      duration: Int,
      timeUnit: TimeUnit,
    ): Boolean {
      val nowNs = System.nanoTime()
      val originalDurationNs =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/HttpUrl.kt

          if (slashCount >= 2 || base == null || base.scheme != this.scheme) {
            // Read an authority if either:
            //  * The input starts with 2 or more slashes. These follow the scheme if it exists.
            //  * The input scheme exists and is different from the base URL's scheme.
            //
            // The structure of an authority is:
            //   username:password@host:port
            //
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 63.5K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

       *     Corresponds to `FLAG_FIN`.
       * @param flushHeaders true to force flush the response headers. This should be true unless the
       *     response body exists and will be written immediately.
       */
      @Throws(IOException::class)
      fun writeHeaders(
        responseHeaders: List<Header>,
        outFinished: Boolean,
        flushHeaders: Boolean,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  4. okhttp/src/main/kotlin/okhttp3/Cache.kt

       * will not be returned. If existing responses are evicted during iteration, they will be absent
       * (unless they were already returned).
       *
       * The iterator supports [MutableIterator.remove]. Removing a URL from the iterator evicts the
       * corresponding response from the cache. Use this to evict selected responses.
       */
      @Throws(IOException::class)
      fun urls(): MutableIterator<String> {
        return object : MutableIterator<String> {
    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)
  5. okhttp/src/main/kotlin/okhttp3/internal/-UtilCommon.kt

     * @param file a file in the directory to check. This file shouldn't already exist!
     */
    internal fun FileSystem.isCivilized(file: Path): Boolean {
      sink(file).use {
        try {
          delete(file)
          return true
        } catch (_: IOException) {
        }
      }
      delete(file)
      return false
    }
    
    /** Delete file we expect but don't require to exist. */
    internal fun FileSystem.deleteIfExists(path: Path) {
      try {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/connection/ConnectionPoolTest.kt

        assertThat(pool.closeConnections(149L)).isEqualTo(1L)
        assertThat(pool.connectionCount()).isEqualTo(1)
        assertThat(c1.socket().isClosed).isFalse()
    
        // Running at time 150, the pool evicts.
        assertThat(pool.closeConnections(150L)).isEqualTo(0)
        assertThat(pool.connectionCount()).isEqualTo(0)
        assertThat(c1.socket().isClosed).isTrue()
    
    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)
  7. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        // Body contains nothing.
        assertThat(response.body.bytes().size).isEqualTo(0)
        assertThat(response.body.contentLength()).isEqualTo(0)
    
        // Content-Length header doesn't exist in a 204 response.
        assertThat(response.header("content-length")).isNull()
        assertThat(response.code).isEqualTo(204)
        val request = server.takeRequest()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java

        Request request = new Request.Builder()
            .url("ws://echo.websocket.org")
            .build();
        client.newWebSocket(request, this);
    
        // Trigger shutdown of the dispatcher's executor so this process exits immediately.
        client.dispatcher().executorService().shutdown();
      }
    
      @Override public void onOpen(WebSocket webSocket, Response response) {
        webSocket.send("Hello...");
        webSocket.send("...World!");
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 04 11:40:21 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/tls/BasicCertificateChainCleaner.kt

    /**
     * A certificate chain cleaner that uses a set of trusted root certificates to build the trusted
     * chain. This class duplicates the clean chain building performed during the TLS handshake. We
     * prefer other mechanisms where they exist, such as with
     * [okhttp3.internal.platform.AndroidPlatform.AndroidCertificateChainCleaner].
     *
     * This class includes code from [Conscrypt's][Conscrypt] [TrustManagerImpl] and
     * [TrustedCertificateIndex].
     *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.8K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/CacheTest.kt

      }
    
      /**
       * Old implementations of OkHttp's response cache wrote header fields like ":status: 200 OK". This
       * broke our cached response parser because it split on the first colon. This regression test
       * exists to help us read these old bad cache entries.
       *
       * https://github.com/square/okhttp/issues/227
       */
      @Test
      fun testGoldenCacheResponse() {
        cache.close()
        server.enqueue(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
Back to top