Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getEnablePush (0.06 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/SettingsTest.kt

        val settings = Settings()
        settings[Settings.HEADER_TABLE_SIZE] = 8096
        assertThat(settings.headerTableSize).isEqualTo(8096)
        assertThat(settings.getEnablePush(true)).isTrue()
        settings[Settings.ENABLE_PUSH] = 1
        assertThat(settings.getEnablePush(false)).isTrue()
        settings.clear()
        assertThat(settings.getMaxConcurrentStreams()).isEqualTo(Int.MAX_VALUE)
        settings[Settings.MAX_CONCURRENT_STREAMS] = 75
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Settings.kt

      operator fun get(id: Int): Int = values[id]
    
      /** Returns the number of settings that have values assigned. */
      fun size(): Int = Integer.bitCount(set)
    
      // TODO: honor this setting.
      fun getEnablePush(defaultValue: Boolean): Boolean {
        val bit = 1 shl ENABLE_PUSH
        return if (bit and set != 0) values[ENABLE_PUSH] == 1 else defaultValue
      }
    
      fun getMaxConcurrentStreams(): Int {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  3. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2Test.kt

            ) {
              // No clearPrevious in HTTP/2.
              assertThat(clearPrevious).isFalse()
              assertThat(settings.headerTableSize).isEqualTo(reducedTableSizeBytes)
              assertThat(settings.getEnablePush(true)).isFalse()
            }
          },
        )
      }
    
      @Test fun readSettingsFrameInvalidPushValue() {
        writeMedium(frame, 6) // 2 for the code and 4 for the value
        frame.writeByte(Http2.TYPE_SETTINGS)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 28.1K bytes
    - Viewed (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/Http2ConnectionTest.kt

        val connection = connectWithSettings(client, settings)
    
        // verify the peer's settings were read and applied.
        assertThat(connection.peerSettings.getEnablePush(true)).isFalse()
      }
    
      @Test fun peerIncreasesMaxFrameSize() {
        val newMaxFrameSize = 0x4001
        val settings = Settings()
        settings[Settings.MAX_FRAME_SIZE] = newMaxFrameSize
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 75.5K bytes
    - Viewed (0)
Back to top