Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 468 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (0)
  2. 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8K bytes
    - Viewed (0)
  3. 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K 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 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  5. 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  6. 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  7. 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 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. 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 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  9. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this attaches a
         * pushed stream to this response.
         */
        fun addPush(promise: PushPromise) =
          apply {
            this.pushPromises += promise
          }
    
        /**
         * When [protocols][MockWebServer.protocols] include [HTTP_2][okhttp3.Protocol], this pushes
         * [settings] before writing the response.
         */
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      private val writerQueue = taskRunner.newQueue()
    
      /** Ensures push promise callbacks events are sent in order per stream. */
      private val pushQueue = taskRunner.newQueue()
    
      /** Notifies the listener of settings changes. */
      private val settingsListenerQueue = taskRunner.newQueue()
    
      /** User code to run in response to push promise events. */
      private val pushObserver: PushObserver = builder.pushObserver
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
Back to top