Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 400 for closed (0.23 sec)

  1. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

          return webSocket!!.processNextFrame()
        }
    
        override fun close() {
          if (closed) {
            throw AssertionError("Already closed")
          }
          try {
            source.close()
          } catch (ignored: IOException) {
          }
          try {
            sink.close()
          } catch (ignored: IOException) {
          }
          closed = true
        }
    
        override fun cancel() {
          canceled = true
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt

      }
    
      @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 {
          if (closed) throw IOException("closed")
          require(errorCode.httpCode != -1)
    
          frameHeader(
    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)
  3. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

            else -> minOf(maxResult, delimiterIndex)
          }
        }
    
        @Throws(IOException::class)
        override fun close() {
          if (closed) return
          closed = true
          currentPart = null
          source.close()
        }
    
        /** A single part in a multipart body. */
        class Part(
          @get:JvmName("headers") val headers: Headers,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/ResponseBody.kt

     * must close this body by calling any of the following methods:
     *
     * * `Response.close()`
     * * `Response.body().close()`
     * * `Response.body().source().close()`
     * * `Response.body().charStream().close()`
     * * `Response.body().byteStream().close()`
     * * `Response.body().bytes()`
     * * `Response.body().string()`
     *
     * There is no benefit to invoking multiple `close()` methods for the same response body.
     *
    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 (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

        ) {
          check(!closed) { "closed" }
          checkOffsetAndCount(source.size, 0, byteCount)
          sink.write(source, byteCount)
        }
    
        override fun flush() {
          if (closed) return // Don't throw; this stream might have been closed on the caller's behalf.
          sink.flush()
        }
    
        override fun close() {
          if (closed) return
          closed = true
          detachTimeout(timeout)
    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)
  6. okhttp/src/test/java/okhttp3/ResponseJvmTest.kt

       * most [BufferedSource] instances, but not of [Buffer].
       */
      private fun responseBody(content: String): ResponseBody {
        val data = Buffer().writeUtf8(content)
        val source: Source =
          object : Source {
            var closed = false
    
            override fun close() {
              closed = true
            }
    
            override fun read(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  7. okhttp-sse/src/test/java/okhttp3/sse/internal/EventSourceRecorder.kt

      ) {
        get().log("[ES] onEvent", Platform.INFO, null)
        events.add(Event(id, type, data))
        drainCancelQueue(eventSource)
      }
    
      override fun onClosed(eventSource: EventSource) {
        get().log("[ES] onClosed", Platform.INFO, null)
        events.add(Closed)
        drainCancelQueue(eventSource)
      }
    
      override fun onFailure(
        eventSource: EventSource,
        t: Throwable?,
        response: Response?,
      ) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.1K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt

                @Throws(IOException::class)
                override fun close() {
                  closed.set(true)
                  super.close()
                }
              }.buffer()
            }
          }
        body.charStream().close()
        assertThat(closed.get()).isTrue()
      }
    
      @Test
      fun readerClosedAfterBomClosesUnderlyingSource() {
        val closed = AtomicBoolean()
        val body: ResponseBody =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  9. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

        this.withLock {
          cancel = !source.finished && source.closed && (sink.finished || sink.closed)
          open = isOpen
        }
        if (cancel) {
          // RST this stream to prevent additional data from being sent. This is safe because the input
          // stream is closed (we won't use any further bytes) and the output stream is either finished
          // or closed (so RSTing both streams doesn't cause harm).
    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)
  10. okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt

        @Throws(IOException::class)
        override fun close() {
          if (closed) return
          closed = true
          try {
            super.close()
            complete(null)
          } catch (e: IOException) {
            throw complete(e)
          }
        }
    
        fun <E : IOException?> complete(e: E): E {
          if (completed) return e
          completed = true
    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)
Back to top