Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. 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)
  2. 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)
  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)
    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)
  4. 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)
  5. 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)
  6. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

      private val messageFrameBuffer = Buffer()
    
      /** Lazily initialized on first use. */
      private var messageInflater: MessageInflater? = null
    
      // Masks are only a concern for server writers.
      private val maskKey: ByteArray? = if (isClient) null else ByteArray(4)
      private val maskCursor: Buffer.UnsafeCursor? = if (isClient) null else Buffer.UnsafeCursor()
    
      interface FrameCallback {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

              return false
            }
    
            if (!dispatcher.peek().inTunnel) return true // No more tunnel requests.
          }
        }
    
        /**
         * Reads a request and writes its response. Returns true if further calls should be attempted
         * on the socket.
         */
        @Throws(IOException::class, InterruptedException::class)
        private fun processOneRequest(
          socket: Socket,
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  8. 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)
  9. okhttp/src/test/java/okhttp3/CacheTest.kt

            .code(HttpURLConnection.HTTP_NOT_MODIFIED)
            .build(),
        )
        server.enqueue(
          MockResponse.Builder()
            .body("B")
            .build(),
        )
    
        // A cache miss writes the cache.
        val t0 = System.currentTimeMillis()
        val response1 = get(server.url("/a"))
        assertThat(response1.body.string()).isEqualTo("A")
        assertThat(response1.header("Allow")).isNull()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 108.6K bytes
    - Viewed (0)
  10. 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)
Back to top