Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 43 for Flush (0.16 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

      ): Sink
    
      /** This should update the HTTP engine's sentRequestMillis field. */
      @Throws(IOException::class)
      fun writeRequestHeaders(request: Request)
    
      /** Flush the request to the underlying socket. */
      @Throws(IOException::class)
      fun flushRequest()
    
      /** Flush the request to the underlying socket and signal no more bytes will be transmitted. */
      @Throws(IOException::class)
      fun finishRequest()
    
      /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/ServerTruncatesRequestTest.kt

        override fun contentType(): MediaType? = null
    
        override fun writeTo(sink: BufferedSink) {
          for (i in 0 until 50) {
            sink.writeUtf8("abc")
            sink.flush()
            Thread.sleep(100)
          }
          fail("")
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/internal/http2/Http2ConnectionTest.kt

        assertThat(connection.writer.maxDataLength()).isEqualTo(newMaxFrameSize)
      }
    
      /**
       * Webservers may set the initial window size to zero, which is a special case because it means
       * that we have to flush headers immediately before any request body can be sent.
       * https://github.com/square/okhttp/issues/2543
       */
      @Test fun peerSetsZeroFlowControl() {
        peer.setClient(true)
    
        // Write the mocking script.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 75.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketWriter.kt

      private val minimumDeflateSize: Long,
    ) : Closeable {
      /** This holds outbound data for compression and masking. */
      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
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

            this.bytesReceived += byteCount
          } catch (e: IOException) {
            throw complete(e)
          }
        }
    
        @Throws(IOException::class)
        override fun flush() {
          try {
            super.flush()
          } catch (e: IOException) {
            throw complete(e)
          }
        }
    
        @Throws(IOException::class)
        override fun close() {
          if (closed) return
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.2K bytes
    - Viewed (2)
  6. okhttp/src/test/java/okhttp3/TestLogHandler.kt

      private val handler =
        object : Handler() {
          override fun publish(logRecord: LogRecord) {
            logs += "${logRecord.level}: ${logRecord.message}"
          }
    
          override fun flush() {
          }
    
          override fun close() {
          }
        }
    
      private var previousLevel: Level? = null
    
      override fun beforeEach(context: ExtensionContext?) {
        previousLevel = logger.level
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        check(state == STATE_CLOSED) { "too early; can't read the trailers yet" }
        return trailers ?: EMPTY_HEADERS
      }
    
      override fun flushRequest() {
        sink.flush()
      }
    
      override fun finishRequest() {
        sink.flush()
      }
    
      /** Returns bytes of a request header for sending on an HTTP transport. */
      fun writeRequest(
        headers: Headers,
        requestLine: String,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/cache/FaultHidingSink.kt

        }
        try {
          super.write(source, byteCount)
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    
      override fun flush() {
        if (hasErrors) {
          return
        }
        try {
          super.flush()
        } catch (e: IOException) {
          hasErrors = true
          onException(e)
        }
      }
    
      override fun close() {
        try {
          super.close()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

          if (byteCount > length) writeContinuationFrames(streamId, byteCount - length)
        }
      }
    
      @Throws(IOException::class)
      fun flush() {
        this.withLock {
          if (closed) throw IOException("closed")
          sink.flush()
        }
      }
    
      @Throws(IOException::class)
      fun rstStream(
        streamId: Int,
        errorCode: ErrorCode,
      ) {
        this.withLock {
    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)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2ExchangeCodec.kt

        stream!!.writeTimeout().timeout(chain.writeTimeoutMillis.toLong(), TimeUnit.MILLISECONDS)
      }
    
      override fun flushRequest() {
        http2Connection.flush()
      }
    
      override fun finishRequest() {
        stream!!.getSink().close()
      }
    
      override fun readResponseHeaders(expectContinue: Boolean): Response.Builder? {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
Back to top