Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 121 for cout (0.36 sec)

  1. okhttp/src/test/java/okhttp3/AutobahnTester.kt

      }
    
      fun run() {
        try {
          val count = getTestCount()
          println("Test count: $count")
          for (number in 1..count) {
            runTest(number, count)
          }
          updateReports()
        } finally {
          client.dispatcher.executorService.shutdown()
        }
      }
    
      private fun runTest(
        number: Long,
        count: Long,
      ) {
        val latch = CountDownLatch(1)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        //     connection is closed. We only close these if the idle connection limit is exceeded.
        //
        // Also count the evictable connections to find out if we must close an EVICTABLE connection
        // before its keepAliveDurationNs is reached.
        var earliestOldIdleAtNs = (now - keepAliveDurationNs) + 1
        var earliestOldConnection: RealConnection? = null
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  3. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

        }
    
        val questionCount = buf.readShort().toInt() and 0xffff
        val answerCount = buf.readShort().toInt() and 0xffff
        buf.readShort() // authority record count
        buf.readShort() // additional record count
    
        for (i in 0 until questionCount) {
          skipName(buf) // name
          buf.readShort() // type
          buf.readShort() // class
        }
    
        for (i in 0 until answerCount) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.8K bytes
    - Viewed (0)
  4. samples/guide/src/main/java/okhttp3/recipes/Progress.java

            if (done) {
              System.out.println("completed");
            } else {
              if (firstUpdate) {
                firstUpdate = false;
                if (contentLength == -1) {
                  System.out.println("content-length: unknown");
                } else {
                  System.out.format("content-length: %d\n", contentLength);
                }
              }
    
              System.out.println(bytesRead);
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 3.9K bytes
    - Viewed (0)
  5. samples/guide/src/main/java/okhttp3/recipes/RewriteResponseCacheControl.java

            // can be read from the cache.
            System.out.println("Force cache: true");
            clientForCall = client.newBuilder()
                .addNetworkInterceptor(REWRITE_CACHE_CONTROL_INTERCEPTOR)
                .build();
          } else {
            System.out.println("Force cache: false");
            clientForCall = client;
          }
    
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 12 03:31:36 GMT 2019
    - 2.6K bytes
    - Viewed (0)
  6. samples/guide/src/main/java/okhttp3/recipes/PerCallSettings.java

            .readTimeout(500, TimeUnit.MILLISECONDS)
            .build();
        try (Response response = client1.newCall(request).execute()) {
          System.out.println("Response 1 succeeded: " + response);
        } catch (IOException e) {
          System.out.println("Response 1 failed: " + e);
        }
    
        // Copy to customize OkHttp for this request.
        OkHttpClient client2 = client.newBuilder()
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun May 22 01:29:42 GMT 2016
    - 1.9K bytes
    - Viewed (0)
  7. samples/slack/src/main/java/okhttp3/slack/RtmSession.java

      @Override public synchronized void onOpen(WebSocket webSocket, Response response) {
        System.out.println("onOpen: " + response);
      }
    
      // TOOD(jwilson): decode incoming messages and dispatch them somewhere.
      @Override public void onMessage(WebSocket webSocket, String text) {
        System.out.println("onMessage: " + text);
      }
    
      @Override public void onClosing(WebSocket webSocket, int code, String reason) {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Nov 19 20:16:58 GMT 2016
    - 2.4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/url/-Url.kt

        val c = this[i]
        if (c == '%' || c == '+' && plusIsSpace) {
          // Slow path: the character at i requires decoding!
          val out = Buffer()
          out.writeUtf8(this, pos, i)
          out.writePercentDecoded(this, pos = i, limit = limit, plusIsSpace = plusIsSpace)
          return out.readUtf8()
        }
      }
    
      // Fast path: no characters in [pos..limit) required decoding.
      return substring(pos, limit)
    }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 7.3K bytes
    - Viewed (0)
  9. okhttp-testing-support/src/main/kotlin/okhttp3/TestUtilJvm.kt

        return List(elements.size / 2) { Header(elements[it * 2]!!, elements[it * 2 + 1]!!) }
      }
    
      @JvmStatic
      fun repeat(
        c: Char,
        count: Int,
      ): String {
        val array = CharArray(count)
        Arrays.fill(array, c)
        return String(array)
      }
    
      /**
       * Okio buffers are internally implemented as a linked list of arrays. Usually this implementation
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 4.3K bytes
    - Viewed (0)
  10. samples/guide/src/main/java/okhttp3/recipes/PostStreamingWithPipe.java

        streamPrimesToSinkAsynchronously(pipeBody.sink());
    
        try (Response response = client.newCall(request).execute()) {
          if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
    
          System.out.println(response.body().string());
        }
      }
    
      private void streamPrimesToSinkAsynchronously(final BufferedSink sink) {
        Thread thread = new Thread("writer") {
          @Override public void run() {
            try {
    Java
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Jul 06 03:18:15 GMT 2018
    - 3.1K bytes
    - Viewed (0)
Back to top