Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 65 for flush (0.2 sec)

  1. okhttp/src/test/java/okhttp3/DuplexTest.kt

          requestBody.flush()
          val responseBody = response.body.source()
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response B")
          requestBody.writeUtf8("request C\n")
          requestBody.flush()
          assertThat(responseBody.readUtf8Line())
            .isEqualTo("response D")
          requestBody.writeUtf8("request E\n")
          requestBody.flush()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 23.9K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

          }
        }
    
        @Throws(IOException::class)
        override fun flush() {
          lock.assertNotHeld()
    
          ******@****.***ck {
            checkOutNotClosed()
          }
          // TODO(jwilson): flush the connection?!
          while (sendBuffer.size > 0L) {
            emitFrame(false)
            connection.flush()
          }
        }
    
        override fun timeout(): Timeout = writeTimeout
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 23.2K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          cleanupQueue.schedule(cleanupTask)
          return null
        }
    
        // Flush the journal before creating files to prevent file leaks.
        val journalWriter = this.journalWriter!!
        journalWriter.writeUtf8(DIRTY)
          .writeByte(' '.code)
          .writeUtf8(key)
          .writeByte('\n'.code)
        journalWriter.flush()
    
        if (hasJournalErrors) {
          return null // Don't edit; the journal can't be written.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/JsseDebugLogging.kt

            override fun publish(record: LogRecord) {
              val param = record.parameters?.firstOrNull() as? String
              debugHandler(JsseDebugMessage(record.message, param))
            }
    
            override fun flush() {
            }
    
            override fun close() {
            }
          },
        )
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/internal/http/ThreadInterruptTest.kt

                  override fun contentType() = null
    
                  override fun writeTo(sink: BufferedSink) {
                    for (i in 0..9) {
                      sink.writeByte(0)
                      sink.flush()
                      sleep(100)
                    }
                    fail("Expected connection to be closed")
                  }
                },
              )
              .build(),
          )
        interruptLater(500)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. docs/hotfixes.md

    Author: Klaus Post <******@****.***>
    Date:   Mon Nov 8 08:41:27 2021 -0800
    
        Close stream on panic (#13605)
    
        Always close streamHTTPResponse on panic on main thread to avoid
        write/flush after response handler has returned.
    ```
    
    ```
    λ git cherry-pick 4f3317effea38c203c358af9cb5ce3c0e4173976
    ```
    
    Plain Text
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Feb 14 21:36:02 GMT 2024
    - 5K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

      ) {
        for ((name, value) in headers) {
          sink.writeUtf8(name)
          sink.writeUtf8(": ")
          sink.writeUtf8(value)
          sink.writeUtf8("\r\n")
        }
        sink.writeUtf8("\r\n")
        sink.flush()
      }
    
      /** Returns a sink that applies throttling and disconnecting. */
      private fun Sink.withThrottlingAndSocketPolicy(
        policy: MockResponse,
        disconnectHalfway: Boolean,
        expectedByteCount: Long,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Mar 31 17:16:15 GMT 2024
    - 37.4K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/WiresharkExample.kt

                if (message == "Produced ClientHello handshake message") {
                  random = readClientRandom(parameter)
                }
              }
            }
    
            override fun flush() {}
    
            override fun close() {}
          }
    
        private fun readClientRandom(param: String): String? {
          val matchResult = randomRegex.find(param)
    
          return if (matchResult != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.7K bytes
    - Viewed (1)
  9. 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)
  10. 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)
Back to top