- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 130 for once (0.13 sec)
-
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt
*/ fun cancel() fun interface Factory { /** * Creates a new event source and immediately returns it. Creating an event source initiates an * asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be * notified. The caller must cancel the returned event source when it is no longer in use. */ fun newEventSource( request: Request,
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
fun commit(upstreamSize: Long) { // Write metadata to the end of the file. writeMetadata(upstreamSize) file!!.channel.force(false) // Once everything else is in place we can swap the dirty header for a clean one. writeHeader(PREFIX_CLEAN, upstreamSize, metadata.size.toLong()) file!!.channel.force(false) // This file is complete. synchronized(this@Relay) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt
/** True if there are more exchanges expected for this call. */ private var expectMoreExchanges = true // These properties are accessed by canceling threads. Any thread can cancel a call, and once it's // canceled it's canceled forever. @Volatile private var canceled = false @Volatile private var exchange: Exchange? = null internal val plansToCancel = CopyOnWriteArrayList<RoutePlanner.Plan>()
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) -
okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnection.kt
* true when removing a connection from the pool; otherwise a racing caller might get it from the * pool when it shouldn't. Symmetrically, this must always be checked before returning a * connection from the pool. * * Once true this is always true. Guarded by this. */ var noNewExchanges = false /** * If true, this connection may not be used for coalesced requests. These are requests that could
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) -
okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 7.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http/RealInterceptorChain.kt
"network interceptor ${interceptors[index - 1]} must retain the same host and port" } check(calls == 1) { "network interceptor ${interceptors[index - 1]} must call proceed() exactly once" } } // Call the next interceptor in the chain. val next = copy(index = index + 1, request = request) val interceptor = interceptors[index] @Suppress("USELESS_ELVIS")
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 4.2K bytes - Viewed (0) -
docs/features/interceptors.md
call to `chain.proceed(request)` is a critical part of each interceptor’s implementation. This simple-looking method is where all the HTTP work happens, producing a response to satisfy the request. If `chain.proceed(request)` is being called more than once previous response bodies must be closed. Interceptors can be chained. Suppose you have both a compressing interceptor and a checksumming interceptor: you'll need to decide whether data is compressed and then checksummed, or checksummed and...
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 8.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/Call.kt
* error to execute a call more than once. */ fun isExecuted(): Boolean fun isCanceled(): Boolean /** * Returns a timeout that spans the entire call: resolving DNS, connecting, writing the request * body, server processing, and reading the response body. If the call requires redirects or * retries all must complete within one timeout period. *
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Wed Dec 20 23:27:07 GMT 2023 - 3.6K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/URLConnectionTest.kt
assertFailsWith<IOException> { getResponse(Request("http://-/foo.html".toHttpUrl())) } } // The request should work once and then fail. @Test fun getKeepAlive() { server.enqueue(MockResponse(body = "ABC")) // The request should work once and then fail. val connection1 = getResponse(newRequest("/")) val source1 = connection1.body.source()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 131.7K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt
contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealConnection.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) } inline fun <T> RealCall.withLock(action: () -> T): T { contract { callsInPlace(action, InvocationKind.EXACTLY_ONCE) } return lock.withLock(action) }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 20 17:03:43 GMT 2024 - 2.1K bytes - Viewed (0)