Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for Writer (0.27 sec)

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

          reader = null
    
          if (enqueuedClose && messageAndCloseQueue.isEmpty()) {
            // Close the writer on the writer's thread.
            val writerToClose = this.writer
            if (writerToClose != null) {
              this.writer = null
              taskQueue.execute("$name writer close", cancelable = false) {
                writerToClose.closeQuietly()
              }
            }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Connection.kt

          }
          if (associatedStreamId == 0) {
            writer.headers(outFinished, streamId, requestHeaders)
          } else {
            require(!client) { "client streams shouldn't have associated stream IDs" }
            // HTTP/2 has a PUSH_PROMISE frame.
            writer.pushPromise(associatedStreamId, streamId, requestHeaders)
          }
        }
    
        if (flushHeaders) {
          writer.flush()
        }
    
        return stream
      }
    
    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)
  4. 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)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      private var maxFrameSize: Int = INITIAL_MAX_FRAME_SIZE
      private var closed: Boolean = false
      val hpackWriter: Hpack.Writer = Hpack.Writer(out = hpackBuffer)
    
      @Throws(IOException::class)
      fun connectionPreface() {
        this.withLock {
          if (closed) throw IOException("closed")
          if (!client) return // Nothing to write; servers don't send connection headers!
          if (logger.isLoggable(FINE)) {
    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)
  6. 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)
  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/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)
  9. okhttp/src/test/java/okhttp3/internal/cache/DiskLruCacheTest.kt

        assertFailsWith<IllegalStateException> {
          abort()
        }
      }
    
      private fun Editor.setString(
        index: Int,
        value: String,
      ) {
        newSink(index).buffer().use { writer ->
          writer.writeUtf8(value)
        }
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 75.8K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Cache.kt

       * directory including files that weren't created by the cache.
       */
      @Throws(IOException::class)
      fun delete() {
        cache.delete()
      }
    
      /**
       * Deletes all values stored in the cache. In-flight writes to the cache will complete normally,
       * but the corresponding responses will not be stored.
       */
      @Throws(IOException::class)
      fun evictAll() {
        cache.evictAll()
      }
    
      /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top