Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 56 for Promise (0.2 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2.kt

        val result = if (flags < FLAGS.size) FLAGS[flags]!! else BINARY[flags]
        // Special case types that have overlap flag values.
        return when {
          type == TYPE_PUSH_PROMISE && flags and FLAG_END_PUSH_PROMISE != 0 -> {
            result.replace("HEADERS", "PUSH_PROMISE") // TODO: Avoid allocation.
          }
          type == TYPE_DATA && flags and FLAG_COMPRESSED != 0 -> {
            result.replace("PRIORITY", "COMPRESSED") // TODO: Avoid allocation.
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/FrameLogTest.kt

        assertThat(frameLog(true, 3, 10000, TYPE_CONTINUATION, 0x4))
          .isEqualTo("<< 0x00000003 10000 CONTINUATION  END_HEADERS")
        assertThat(frameLog(true, 4, 10000, TYPE_PUSH_PROMISE, 0x4))
          .isEqualTo("<< 0x00000004 10000 PUSH_PROMISE  END_PUSH_PROMISE")
      }
    
      @Test
      fun flagOverlapOn0x20() {
        assertThat(frameLog(true, 3, 10000, TYPE_HEADERS, 0x20))
          .isEqualTo("<< 0x00000003 10000 HEADERS       PRIORITY")
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/SocketChannelTest.kt

        val request =
          Request.Builder()
            .url(url)
            .build()
    
        val promise = CompletableFuture<Response>()
    
        val call = client.newCall(request)
        call.enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              promise.completeExceptionally(e)
            }
    
            override fun onResponse(
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

          flags = FLAG_ACK,
        )
        sink.flush()
      }
    
      /**
       * HTTP/2 only. Send a push promise header block.
       *
       * A push promise contains all the headers that pertain to a server-initiated request, and a
       * `promisedStreamId` to which response frames will be delivered. Push promise frames are sent as
       * a part of the response to `streamId`. The `promisedStreamId` has a priority of one greater than
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Wed Apr 17 05:15:48 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  5. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/ListenableFuture.java

      }
    
      @JsFunction
      interface IThenOnRejectedCallbackFn<V extends @Nullable Object> {
        V onInvoke(Object p0);
      }
    }
    
    /** Subset of the elemental2 Promise API. */
    @JsType(isNative = true, namespace = JsPackage.GLOBAL, name = "Promise")
    class Promise<T extends @Nullable Object> implements IThenable<T> {
    
      @JsFunction
      interface PromiseExecutorCallbackFn<T extends @Nullable Object> {
        @JsFunction
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Oct 24 18:27:19 GMT 2023
    - 3.9K bytes
    - Viewed (1)
  6. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

          weight: Int,
          exclusive: Boolean,
        )
    
        /**
         * HTTP/2 only. Receive a push promise header block.
         *
         * A push promise contains all the headers that pertain to a server-initiated request, and a
         * `promisedStreamId` to which response frames will be delivered. Push promise frames are sent
         * as a part of the response to `streamId`.
         *
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

        headersDelayAmount = delay
        headersDelayUnit = unit
      }
    
      fun getHeadersDelay(unit: TimeUnit): Long = unit.convert(headersDelayAmount, headersDelayUnit)
    
      fun withPush(promise: PushPromise) =
        apply {
          promises.add(promise)
        }
    
      fun withSettings(settings: Settings) =
        apply {
          this.settings = settings
        }
    
      fun withWebSocketUpgrade(listener: WebSocketListener) =
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

            Header(Header.TARGET_PATH, "/"),
          )
    
        // Write the push promise frame, specifying the associated stream ID.
        val headerBytes = literalHeaders(pushPromise)
        writeMedium(frame, (headerBytes.size + 4).toInt())
        frame.writeByte(Http2.TYPE_PUSH_PROMISE)
        frame.writeByte(Http2.FLAG_END_PUSH_PROMISE)
        frame.writeInt(expectedStreamId and 0x7fffffff)
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        }
    
        override fun pushPromise(
          streamId: Int,
          associatedStreamId: Int,
          headerBlock: List<Header>,
        ) {
          this.type = Http2.TYPE_PUSH_PROMISE
          this.streamId = streamId
          this.associatedStreamId = associatedStreamId
          this.headerBlock = headerBlock
        }
    
        override fun alternateService(
          streamId: Int,
          origin: String,
    Plain Text
    - Registered: Fri Apr 19 11:42:09 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/ImmutableCollection.java

           * we're copying into a `contents` array whose type allows it to contain nulls. Still, it's
           * worth noting that we promise not to put nulls into the array in the first `size` elements.
           * We uphold that promise here because our callers promise that `elements` will not contain
           * nulls in its first `n` elements.
           */
          System.arraycopy(elements, 0, contents, size, n);
          size += n;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Apr 01 16:15:01 GMT 2024
    - 21.5K bytes
    - Viewed (0)
Back to top