- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 80 for cancelFn (0.16 sec)
-
okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt
import okhttp3.internal.stripBody import okhttp3.internal.withSuppressed /** * This interceptor recovers from failures and follows redirects as necessary. It may throw an * [IOException] if the call was canceled. */ class RetryAndFollowUpInterceptor(private val client: OkHttpClient) : Interceptor { @Throws(IOException::class) override fun intercept(chain: Interceptor.Chain): Response {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 15 13:24:48 GMT 2024 - 12.1K bytes - Viewed (4) -
okhttp/src/main/kotlin/okhttp3/EventListener.kt
) { } /** * Invoked when a call is canceled. * * Like all methods in this interface, this is invoked on the thread that triggered the event. But * while other events occur sequentially; cancels may occur concurrently with other events. For * example, thread A may be executing [responseBodyStart] while thread B executes [canceled]. * Implementations must support such concurrent calls. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 15.2K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt
apply { actions += { stream -> if (!stream.requestBody.exhausted()) throw AssertionError("expected exhausted") } } fun cancelStream() = apply { actions += { stream -> stream.cancel() } } fun requestIOException() = apply { actions += { stream -> try { stream.requestBody.exhausted() throw AssertionError("expected IOException")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 3.2K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt
) = TODO() override fun callEnd(call: Call) = TODO() override fun callFailed( call: Call, ioe: IOException, ) = TODO() override fun canceled(call: Call) = TODO() } val none: EventListener = EventListener.NONE } @Test fun eventListenerBuilder() { var builder: EventListener.Factory = EventListener.Factory { TODO() } }
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) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt
if (!newRouteSelector.hasNext()) throw IOException("exhausted all routes") val newRouteSelection = newRouteSelector.next() routeSelection = newRouteSelection if (isCanceled()) throw IOException("Canceled") return planConnectToRoute(newRouteSelection.next(), newRouteSelection.routes) } /** * Returns a plan to reuse a pooled connection, or null if the pool doesn't have a connection for
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 12K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/DuplexTest.kt
* inbound data and send an early 400 before the request body completes. * * This test sends a slow request that is canceled by the server. It expects the response to still * be readable after the request stream is canceled. */ @Disabled @Test fun serverCancelsRequestBodyAndSendsResponseBody() { client = client.newBuilder()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 23.9K bytes - Viewed (0) -
okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceHttpTest.kt
| """.trimMargin(), ).setHeader("content-type", "text/event-stream") .build(), ) listener.enqueueCancel() // Will cancel in onOpen(). newEventSource() listener.assertOpen() listener.assertFailure("canceled") } @Test fun badContentType() { server.enqueue( MockResponse.Builder() .body( """ |data: hey
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Jan 14 10:20:09 GMT 2024 - 6.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/SequentialExchangeFinder.kt
override val routePlanner: RoutePlanner, ) : ExchangeFinder { override fun find(): RealConnection { var firstException: IOException? = null while (true) { if (routePlanner.isCanceled()) throw IOException("Canceled") try { val plan = routePlanner.plan() if (!plan.isReady) { val tcpConnectResult = plan.connectTcp() val connectResult = when {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt
@Throws(IOException::class) internal fun cancelStreamIfNecessary() { lock.assertNotHeld() val open: Boolean val cancel: Boolean this.withLock { cancel = !source.finished && source.closed && (sink.finished || sink.closed) open = isOpen } if (cancel) { // RST this stream to prevent additional data from being sent. This is safe because the input
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) -
okhttp-sse/api/okhttp-sse.api
public abstract interface class okhttp3/sse/EventSource { public abstract fun cancel ()V public abstract fun request ()Lokhttp3/Request; } public abstract interface class okhttp3/sse/EventSource$Factory { public abstract fun newEventSource (Lokhttp3/Request;Lokhttp3/sse/EventSourceListener;)Lokhttp3/sse/EventSource; } public abstract class okhttp3/sse/EventSourceListener { public fun <init> ()V public fun onClosed (Lokhttp3/sse/EventSource;)V
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Dec 17 14:39:59 GMT 2023 - 1.1K bytes - Viewed (0)