Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for Callback (0.18 sec)

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

              responseCallback.onResponse(this@RealCall, response)
            } catch (e: IOException) {
              if (signalledCallback) {
                // Do not signal the callback twice!
                Platform.get().log("Callback failure for ${toLoggableString()}", Platform.INFO, e)
              } else {
                responseCallback.onFailure(this@RealCall, e)
              }
            } catch (t: Throwable) {
              cancel()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  2. okhttp/src/test/java/okhttp3/DispatcherTest.kt

        dispatcher.maxRequests = 2
        client.newCall(newRequest("http://a/1")).enqueue(callback)
        client.newCall(newRequest("http://b/1")).enqueue(callback)
        client.newCall(newRequest("http://c/1")).enqueue(callback)
        client.newCall(newRequest("http://a/2")).enqueue(callback)
        client.newCall(newRequest("http://b/2")).enqueue(callback)
        dispatcher.maxRequests = 4
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 12.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/ws/WebSocketReaderTest.kt

        data.write("8a00".decodeHex()) // Pong
        data.write("80026c6f".decodeHex()) // lo
        clientReader.processNextFrame()
        callback.assertPong(EMPTY)
        callback.assertPong(EMPTY)
        callback.assertPong(EMPTY)
        callback.assertPong(EMPTY)
        callback.assertTextMessage("Hello")
      }
    
      @Test fun clientTwoFrameCompressedHelloWithPongs() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.4K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/InterceptorTest.kt

                    Request.Builder()
                      .url(server.url("/a"))
                      .build()
                  try {
                    val callbackA = RecordingCallback()
                    client.newCall(requestA).enqueue(callbackA)
                    callbackA.await(requestA.url).assertBody("a")
                  } catch (e: Exception) {
                    throw RuntimeException(e)
                  }
                }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Jan 14 10:20:09 GMT 2024
    - 27.8K bytes
    - Viewed (0)
  5. docs/changelogs/changelog_4x.md

        scheduling. In your debugger you will see new thread names and more use of daemon threads.
    
     *  Fix: Don't drop callbacks on unexpected exceptions. When an interceptor throws an unchecked
        exception the callback is now notified that the call was canceled. The exception is still sent
        to the uncaught exception handler for reporting and recovery.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/WholeOperationTimeoutTest.kt

        val latch = CountDownLatch(1)
        val exceptionRef = AtomicReference<Throwable>()
        val call = client.newCall(request)
        call.timeout().timeout(250, TimeUnit.MILLISECONDS)
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              exceptionRef.set(e)
              latch.countDown()
            }
    
            @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * may ultimately cause the application to slow down or crash.
     *
     * Both this class and [Response] implement [Closeable]. Closing a response simply
     * closes its response body. If you invoke [Call.execute] or implement [Callback.onResponse] you
     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
    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 (0)
  8. docs/changelogs/changelog_2x.md

     *  **TLS configuration updated.** OkHttp now explicitly enables TLSv1.2,
        TLSv1.1 and TLSv1.0 where they are supported. It will continue to perform
        only one fallback, to SSLv3. Applications can now configure this with the
        `ConnectionSpec` class.
    
        To disable TLS fallback:
    
        ```java
        client.setConnectionSpecs(Arrays.asList(
            ConnectionSpec.MODERN_TLS, ConnectionSpec.CLEARTEXT));
        ```
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 26.6K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/Response.kt

       */
      @get:JvmName("handshake") val handshake: Handshake?,
      /** Returns the HTTP headers. */
      @get:JvmName("headers") val headers: Headers,
      /**
       * Returns a non-null value if this response was passed to [Callback.onResponse] or returned
       * from [Call.execute]. Response bodies must be [closed][ResponseBody] and may
       * be consumed only once.
       *
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

            override fun enqueue(responseCallback: Callback) = TODO()
    
            override fun cancel() = TODO()
    
            override fun isExecuted(): Boolean = TODO()
    
            override fun isCanceled(): Boolean = TODO()
    
            override fun timeout(): Timeout = TODO()
    
            override fun clone(): Call = TODO()
          }
      }
    
      @Test
      fun callback() {
        val callback =
          object : Callback {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
Back to top