Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 134 for once (0.17 sec)

  1. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/EventListener.kt

      /**
       * Invoked as soon as a call is enqueued or executed by a client. In case of thread or stream
       * limits, this call may be executed well before processing the request is able to begin.
       *
       * This will be invoked only once for a single [Call]. Retries of different routes or redirects
       * will be handled within the boundaries of a single [callStart] and [callEnd]/[callFailed] pair.
       */
      open fun callStart(call: Call) {
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 15.2K bytes
    - Viewed (0)
  3. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

            return headersQueue.removeFirst()
          }
          throw errorException ?: StreamResetException(errorCode!!)
        }
      }
    
      /**
       * Returns the trailers. It is only safe to call this once the source stream has been completely
       * exhausted.
       */
      @Throws(IOException::class)
      fun trailers(): Headers {
        this.withLock {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  5. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

              return block()
            }
          },
          delayNanos,
        )
      }
    
      /**
       * Executes [block] once on a task runner thread.
       *
       * TODO: make this inline once this is fixed: https://github.com/oracle/graal/issues/3466
       */
      fun execute(
        name: String,
        delayNanos: Long = 0L,
        cancelable: Boolean = true,
        block: () -> Unit,
      ) {
        schedule(
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/ResponseCommonTest.kt

        assertThat(response.body.contentLength()).isEqualTo(0L)
        assertThat(response.body.byteString()).isEqualTo(EMPTY)
      }
    
      /**
       * Returns a new response body that refuses to be read once it has been closed. This is true of
       * most [BufferedSource] instances, but not of [Buffer].
       */
      private fun responseBody(content: String): ResponseBody {
        val data = Buffer().writeUtf8(content)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  8. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  9. okhttp/src/main/kotlin/okhttp3/Connection.kt

     * used. HTTP/1.x connections can carry either zero or one streams. HTTP/2 connections can carry any
     * number of streams, dynamically configured with `SETTINGS_MAX_CONCURRENT_STREAMS`. A connection
     * currently carrying zero streams is an idle stream. We keep it alive because reusing an existing
     * connection is typically faster than establishing a new one.
     *
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 4.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/WebSocket.kt

       */
      fun cancel()
    
      fun interface Factory {
        /**
         * Creates a new web socket and immediately returns it. Creating a web socket initiates an
         * asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be
         * notified. The caller must either close or cancel the returned web socket when it is no longer
         * in use.
         */
        fun newWebSocket(
          request: Request,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top