Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for synchrones (0.21 sec)

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

     * when responses are of an unexpected type or cannot be decoded.
     *
     * Other exception types cancel the current call:
     *
     *  * For synchronous calls made with [Call.execute], the exception is propagated to the caller.
     *
     *  * For asynchronous calls made with [Call.enqueue], an [IOException] is propagated to the caller
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt

          override fun cancel() {
            exchange.cancel()
          }
        }
      }
    
      override fun route(): Route = route
    
      override fun cancel() {
        // Close the raw socket so we don't end up doing synchronous I/O.
        rawSocket?.closeQuietly()
      }
    
      override fun socket(): Socket = socket!!
    
      /** Returns true if this connection is ready to host new streams. */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

      ) {
        // Do nothing.
      }
    
      override fun noNewExchanges() {
        // Do nothing.
      }
    
      override fun cancel() {
        canceled = true
        // Close the raw socket so we don't end up doing synchronous I/O.
        rawSocket?.closeQuietly()
      }
    
      override fun retry(): RoutePlanner.Plan {
        return ConnectPlan(
          taskRunner = taskRunner,
          connectionPool = connectionPool,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  4. docs/features/calls.md

    Calls are executed in one of two ways:
    
     * **Synchronous:** your thread blocks until the response is readable.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Feb 06 02:19:09 GMT 2022
    - 3.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * * `Response.body().byteStream().close()`
     * * `Response.body().bytes()`
     * * `Response.body().string()`
     *
     * There is no benefit to invoking multiple `close()` methods for the same response body.
     *
     * For synchronous calls, the easiest way to make sure a response body is closed is with a `try`
     * block. With this structure the compiler inserts an implicit `finally` clause that calls
     * [close()][Response.close] for you.
     *
     * ```java
    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)
  6. okhttp/src/test/java/okhttp3/InterceptorTest.kt

      }
    
      @Test
      fun networkInterceptorThrowsRuntimeExceptionSynchronous() {
        interceptorThrowsRuntimeExceptionSynchronous(true)
      }
    
      /**
       * When an interceptor throws an unexpected exception, synchronous callers can catch it and deal
       * with it.
       */
      private fun interceptorThrowsRuntimeExceptionSynchronous(network: Boolean) {
        addInterceptor(network) { chain: Interceptor.Chain? -> throw RuntimeException("boom!") }
    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)
  7. okhttp/src/main/kotlin/okhttp3/Dispatcher.kt

       * become idle after the [onResponse][Callback.onResponse] or [onFailure][Callback.onFailure]
       * callback has returned. Synchronous calls become idle once [execute()][Call.execute] returns.
       * This means that if you are doing synchronous calls the network layer will not truly be idle
       * until every returned [Response] has been closed.
       */
      var idleCallback: Runnable? = null
    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)
  8. README.md

    configured to fall back for broad connectivity.
    
    Using OkHttp is easy. Its request/response API is designed with fluent builders and immutability. It
    supports both synchronous blocking calls and async calls with callbacks.
    
    
    Get a URL
    ---------
    
    This program downloads a URL and prints its contents as a string. [Full source][get_example].
    
    ```java
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 6.2K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

    import okio.buffer
    import okio.sink
    import okio.source
    
    /**
     * A socket connection to a remote peer. A connection hosts streams which can send and receive
     * data.
     *
     * Many methods in this API are **synchronous:** the call is completed before the method returns.
     * This is typical for Java but atypical for HTTP/2. This is motivated by exception transparency:
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
  10. docs/changelogs/changelog_2x.md

        corrupted journal. We've added APIs to configure a request's `Cache-Control`
        headers, and to manually clear the cache.
    
     *  **Request cancellation fixes.** This update fixes a bug where synchronous
        requests couldn't be canceled by tag. This update avoids crashing when
        `onResponse()` throws an `IOException`. That failure will now be logged
    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)
Back to top