Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for Writer (0.16 sec)

  1. 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)
    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)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          } catch (_: NumberFormatException) {
            invalidLengths(strings)
          }
        }
    
        /** Append space-prefixed lengths to [writer]. */
        @Throws(IOException::class)
        internal fun writeLengths(writer: BufferedSink) {
          for (length in lengths) {
            writer.writeByte(' '.code).writeDecimalLong(length)
          }
        }
    
        @Throws(IOException::class)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/DuplexTest.kt

       * already split off another thread to stream the request body. Because we permit at most one
       * exchange at a time we break the request stream out from under that writer.
       */
      @Test
      fun duplexWithRedirect() {
        enableProtocol(Protocol.HTTP_2)
        val duplexResponseSent = CountDownLatch(1)
        listener =
          object : RecordingEventListener() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      private val messageBuffer = Buffer()
    
      /** The [Buffer] of [sink]. Write to this and then flush/emit [sink]. */
      private val sinkBuffer: Buffer = sink.buffer
      private var writerClosed = false
    
      /** Lazily initialized on first use. */
      private var messageDeflater: MessageDeflater? = null
    
      // Masks are only a concern for client writers.
      private val maskKey: ByteArray? = if (isClient) ByteArray(4) else null
    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)
  5. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        // Verify the peer's settings were read and applied.
        assertThat(connection.peerSettings.headerTableSize).isEqualTo(0)
        val writer = connection.writer
        assertThat(writer.hpackWriter.dynamicTableByteCount).isEqualTo(0)
        assertThat(writer.hpackWriter.headerTableSizeSetting).isEqualTo(0)
      }
    
      @Test fun peerHttp2ClientDisablesPush() {
        val client = false // Peer is client, so we are server.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  6. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerAdapter.kt

      fun fromDer(byteString: ByteString): T {
        val buffer = Buffer().write(byteString)
        val reader = DerReader(buffer)
        return fromDer(reader)
      }
    
      /**
       * Writes [value] to this adapter, unless it is the default value and can be safely omitted.
       *
       * If this does write a value, it will write a tag and a length and a full value.
       */
      fun toDer(
        writer: DerWriter,
        value: T,
      )
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

      fun setClient(client: Boolean) {
        if (this.client == client) return
        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
    
    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. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

            bits: Int,
          ) {
            var value = value
            // Write the raw value for a single byte value.
            if (value < prefixMask) {
              out.writeByte(bits or value)
              return
            }
    
            // Write the mask to start a multibyte value.
            out.writeByte(bits or prefixMask)
            value -= prefixMask
    
            // Write 7 bits at a time 'til we're done.
            while (value >= 0x80) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
  9. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

      private lateinit var server: MockWebServer
      private lateinit var client: OkHttpClient
    
      @BeforeEach
      fun setUp() {
        // Sockets on some platforms can have large buffers that mean writes do not block when
        // required. These socket factories explicitly set the buffer sizes on sockets created.
        server = MockWebServer()
        server.serverSocketFactory =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

        }
      }
    
      /** A sink that writes outgoing data frames of a stream. This class is not thread safe. */
      internal inner class FramingSink(
        /** True if either side has cleanly shut down this stream. We shall send no more bytes. */
        var finished: Boolean = false,
      ) : Sink {
        /**
         * Buffer of outgoing data. This batches writes of small writes into this sink as larges frames
    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)
Back to top