Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for exhaustResponse (0.09 sec)

  1. okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/MockSocketHandler.kt

        responseSent: CountDownLatch = CountDownLatch(1),
      ) = apply {
        actions += { stream ->
          stream.sink.writeUtf8(s)
          stream.sink.flush()
          responseSent.countDown()
        }
      }
    
      fun exhaustResponse() =
        apply {
          actions += { stream -> stream.sink.close() }
        }
    
      fun sleep(
        duration: Long,
        unit: TimeUnit,
      ) = apply {
        actions += { Thread.sleep(unit.toMillis(duration)) }
      }
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 3.3K bytes
    - Viewed (0)
  2. okhttp/src/jvmTest/kotlin/okhttp3/internal/http/HttpUpgradesTest.kt

            .apply {
              receiveRequest("client says hello\n")
              sendResponse("server says hello\n")
              receiveRequest("client says goodbye\n")
              sendResponse("server says goodbye\n")
              exhaustResponse()
              exhaustRequest()
            }
        server.enqueue(socketHandler.upgradeResponse())
    
        client
          .newCall(
            upgradeRequest(),
          ).execute()
          .use { response ->
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 31 04:18:40 UTC 2025
    - 7.1K bytes
    - Viewed (0)
Back to top