Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 619 for close (0.19 sec)

  1. internal/http/close.go

    )
    
    // DrainBody close non nil response with any response Body.
    // convenient wrapper to drain any remaining data on response body.
    //
    // Subsequently this allows golang http RoundTripper
    // to reuse the same connection for future requests.
    func DrainBody(respBody io.ReadCloser) {
    	// Callers should close resp.Body when done reading from it.
    	// If resp.Body is not closed, the Client's underlying RoundTripper
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/io/Closer.java

      @VisibleForTesting
      Closer(Suppressor suppressor) {
        this.suppressor = checkNotNull(suppressor); // checkNotNull to satisfy null tests
      }
    
      /**
       * Registers the given {@code closeable} to be closed when this {@code Closer} is {@linkplain
       * #close closed}.
       *
       * @return the given {@code closeable}
       */
      // close. this word no longer has any meaning to me.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 11.9K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/CloserTest.java

        Closer closer = new Closer(suppressor);
    
        IOException exception = new IOException();
    
        // c2 is added last, closed first
        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.throwsOnClose(exception));
    
        try {
          closer.close();
        } catch (Throwable expected) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  4. internal/ioutil/ioutil.go

    		w.wLimit -= int64(n1)
    		return n, err
    	}
    	n1, err = w.Writer.Write(p)
    	w.wLimit -= int64(n1)
    	return n, err
    }
    
    // Close closes the LimitWriter. It behaves like io.Closer.
    func (w *LimitWriter) Close() error {
    	if closer, ok := w.Writer.(io.Closer); ok {
    		return closer.Close()
    	}
    	return nil
    }
    
    // LimitedWriter takes an io.Writer and returns an ioutil.LimitWriter.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Apr 19 11:26:59 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/CloserTest.java

        Closer closer = new Closer(suppressor);
    
        IOException exception = new IOException();
    
        // c2 is added last, closed first
        TestCloseable c1 = closer.register(TestCloseable.normal());
        TestCloseable c2 = closer.register(TestCloseable.throwsOnClose(exception));
    
        try {
          closer.close();
        } catch (Throwable expected) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Mar 06 15:15:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

        server.listener.assertExhausted()
        server.source.close()
        client.source.close()
        taskFaker.runTasks()
        server.webSocket!!.tearDown()
        client.webSocket!!.tearDown()
        taskFaker.close()
      }
    
      @Test
      fun close() {
        client.webSocket!!.close(1000, "Hello!")
        // This will trigger a close response.
        assertThat(server.processNextFrame()).isFalse()
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/cache2/RelayTest.kt

        val relay = edit(file, upstream, metadata, 1024)
        val source1 = relay.newSource()
        val source2 = relay.newSource()
        source1!!.close()
        source1.close() // Unnecessary. Shouldn't decrement the reference count.
        assertThat(relay.isClosed).isFalse()
        source2!!.close()
        assertThat(relay.isClosed).isTrue()
        assertFile(Relay.PREFIX_DIRTY, -1L, -1, null, null)
      }
    
      @Test
      fun racingReaders() {
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/ws/RealWebSocket.kt

            synchronized(this) {
              queueSize -= message.data.size.toLong()
            }
          } else if (messageOrClose is Close) {
            val close = messageOrClose as Close
            writer!!.writeClose(close.code, close.reason)
    
            // We closed the writer: now both reader and writer are closed.
            if (streamsToClose != null) {
              listener.onClosed(this, receivedCloseCode, receivedCloseReason!!)
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 22.1K bytes
    - Viewed (0)
  9. .github/workflows/stale-pr.yml

                It will be closed in 14 days if no further activity occurs.
                If you don't want the stale bot to close it, then set a milestone for it.
              days-before-pr-close: 14
              close-pr-message: >
    Others
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Feb 05 12:52:42 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  10. 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)
Back to top