Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 283 for close (0.16 sec)

  1. 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 Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 13K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

            maskCursor.close()
          }
        }
    
        when (opcode) {
          OPCODE_CONTROL_PING -> {
            frameCallback.onReadPing(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_PONG -> {
            frameCallback.onReadPong(controlFrameBuffer.readByteString())
          }
          OPCODE_CONTROL_CLOSE -> {
            var code = CLOSE_NO_STATUS_CODE
            var reason = ""
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/connection/RealConnectionPool.kt

        //     we find them, regardless of what the address policies need.
        //
        //  2. EVICTABLE: Connections not required by any address policy. This matches connections that
        //     don't participate in any policy, plus connections whose policies won't be violated if the
        //     connection is closed. We only close these if the idle connection limit is exceeded.
        //
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/internal/http2/MockHttp2Peer.kt

            // Write a frame.
            val length = (end - start).toInt()
            outputStream.write(outBytes, start.toInt(), length)
    
            // If the last frame was truncated, immediately close the connection.
            if (truncated) {
              socket.close()
            }
          } else {
            // read a frame
            val inFrame = InFrame(i, reader)
            reader.nextFrame(false, inFrame)
            inFrames.add(inFrame)
          }
    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)
  5. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

            webSocketCloseTimeout = RealWebSocket.CANCEL_AFTER_CLOSE_MILLIS,
          )
        val name = "MockWebServer WebSocket ${request.path!!}"
        webSocket.initReaderAndWriter(name, streams)
        try {
          webSocket.loopReader(fancyResponse)
    
          // Even if messages are no longer being read we need to wait for the connection close signal.
          connectionClose.await()
        } finally {
    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)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      override fun clone(): Call = RealCall(client, originalRequest, forWebSocket)
    
      override fun request(): Request = originalRequest
    
      /**
       * Immediately closes the socket connection if it's currently held. Use this to interrupt an
       * in-flight request from any thread. It's the caller's responsibility to close the request body
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  7. okhttp/src/test/java/okhttp3/ResponseBodyTest.kt

              val source = Buffer().writeUtf8("hello")
              return object : ForwardingSource(source) {
                override fun close() {
                  closed = true
                  super.close()
                }
              }.buffer()
            }
          }
        body.source().close()
        assertThat(closed).isTrue()
      }
    
      @Test
      fun throwingUnderlyingSourceClosesQuietly() {
        val body: ResponseBody =
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Stream.kt

        )
      internal val readTimeout = StreamTimeout()
      internal val writeTimeout = StreamTimeout()
    
      /**
       * The reason why this stream was closed, or null if it closed normally or has not yet been
       * closed.
       *
       * If there are multiple reasons to abnormally close this stream (such as both peers closing it
       * near-simultaneously) then this is the first reason known to this peer.
       */
    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)
  9. okhttp/src/main/kotlin/okhttp3/internal/cache/DiskLruCache.kt

          if (civilizedFileSystem) return fileSource
    
          lockingSourceCount++
          return object : ForwardingSource(fileSource) {
            private var closed = false
    
            override fun close() {
              super.close()
              if (!closed) {
                closed = true
                synchronized(this@DiskLruCache) {
                  lockingSourceCount--
                  if (lockingSourceCount == 0 && zombie) {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 34.7K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

        server.enqueue(response)
        val request = newRequest("/")
        val c1 = getResponse(request)
        assertContent("ABCDE", c1, 5)
        val c2 = getResponse(request)
        assertContent("ABCDE", c2, 5)
        c1.close()
        c2.close()
      }
    
      @Test
      fun connectionsArePooled() {
        val response =
          MockResponse(
            body = "ABCDEFGHIJKLMNOPQR",
          )
        server.enqueue(response)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
Back to top