Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for Http2Writer (0.2 sec)

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

    import okhttp3.internal.http2.Http2.frameLogWindowUpdate
    import okhttp3.internal.writeMedium
    import okio.Buffer
    import okio.BufferedSink
    
    /** Writes HTTP/2 transport frames. */
    @Suppress("NAME_SHADOWING")
    class Http2Writer(
      private val sink: BufferedSink,
      private val client: Boolean,
    ) : Closeable {
      internal val lock: ReentrantLock = ReentrantLock()
    
      private val hpackBuffer: Buffer = Buffer()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 11.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

        this.client = client
        writer = Http2Writer(bytesOut, client)
      }
    
      fun acceptFrame() {
        frameCount++
      }
    
      /** Maximum length of an outbound data frame.  */
      fun maxOutboundDataLength(): Int = writer.maxDataLength()
    
      /** Count of frames sent or received.  */
      fun frameCount(): Int = frameCount
    
      fun sendFrame(): Http2Writer {
        outFrames.add(OutFrame(frameCount++, bytesOut.size, false))
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/Http2Test.kt

        val newMaxFrameSize = 16777215
        val writer = Http2Writer(Buffer(), true)
        writer.applyAndAckSettings(Settings().set(Settings.MAX_FRAME_SIZE, newMaxFrameSize))
        assertThat(writer.maxDataLength()).isEqualTo(newMaxFrameSize)
        writer.frameHeader(0, newMaxFrameSize, Http2.TYPE_DATA, FLAG_NONE)
      }
    
      @Test fun streamIdHasReservedBit() {
        val writer = Http2Writer(Buffer(), true)
        assertFailsWith<IllegalArgumentException> {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 28.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/Locks.kt

    import kotlin.contracts.InvocationKind
    import kotlin.contracts.contract
    import okhttp3.Dispatcher
    import okhttp3.internal.http2.Http2Connection
    import okhttp3.internal.http2.Http2Stream
    import okhttp3.internal.http2.Http2Writer
    
    /**
     * Centralisation of central locks according to docs/contribute/concurrency.md
     */
    internal object Locks {
      inline fun <T> Dispatcher.withLock(action: () -> T): T {
    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)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

      var writeBytesMaximum: Long = peerSettings.initialWindowSize.toLong()
        private set
    
      internal val socket: Socket = builder.socket
      val writer = Http2Writer(builder.sink, client)
    
      // Visible for testing
      val readerRunnable = ReaderRunnable(Http2Reader(builder.source, client))
    
      // Guarded by this.
      private val currentPushRequests = mutableSetOf<Int>()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 32.6K bytes
    - Viewed (0)
Back to top