Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 63 for Rischard (0.29 sec)

  1. internal/ioutil/discard.go

    import (
    	"io"
    )
    
    // Discard is just like io.Discard without the io.ReaderFrom compatible
    // implementation which is buggy on NUMA systems, we have to use a simpler
    // io.Writer implementation alone avoids also unnecessary buffer copies,
    // and as such incurred latencies.
    var Discard io.Writer = discard{}
    
    // discard is /dev/null for Golang.
    type discard struct{}
    
    func (discard) Write(p []byte) (int, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Nov 06 22:26:08 GMT 2023
    - 1.3K bytes
    - Viewed (0)
  2. logger/logger.go

    	Error(context.Context, string, ...interface{})
    	Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error)
    }
    
    var (
    	// Discard logger will print any log to io.Discard
    	Discard = New(log.New(io.Discard, "", log.LstdFlags), Config{})
    	// Default Default logger
    	Default = New(log.New(os.Stdout, "\r\n", log.LstdFlags), Config{
    		SlowThreshold:             200 * time.Millisecond,
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Nov 07 02:19:41 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/ConnectionReuseTest.kt

        val request = Request(server.url("/"))
        val response1 = client.newCall(request).execute()
        val response2 = client.newCall(request).execute()
        response1.body.string() // Discard the response body.
        response2.body.string() // Discard the response body.
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(0)
        assertThat(server.takeRequest().sequenceNumber).isEqualTo(1)
      }
    
      @Test
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

            responseBodyComplete()
          }
          return read
        }
    
        override fun close() {
          if (closed) return
    
          if (bytesRemaining != 0L &&
            !discard(ExchangeCodec.DISCARD_STREAM_TIMEOUT_MILLIS, MILLISECONDS)
          ) {
            carrier.noNewExchanges() // Unread bytes remain on the stream.
            responseBodyComplete()
          }
    
          closed = true
        }
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

            }
    
            override fun timeout(): Timeout = source.timeout()
    
            @Throws(IOException::class)
            override fun close() {
              if (!cacheRequestClosed &&
                !discard(ExchangeCodec.DISCARD_STREAM_TIMEOUT_MILLIS, MILLISECONDS)
              ) {
                cacheRequestClosed = true
                cacheRequest.abort()
              }
              source.close()
            }
          }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/ExchangeCodec.kt

         * reuse, this timeout should be significantly less than the time it takes to establish a new
         * connection.
         */
        const val DISCARD_STREAM_TIMEOUT_MILLIS = 100
      }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3K bytes
    - Viewed (0)
  7. internal/hash/reader_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	_, err = io.Copy(io.Discard, r)
    	if err != nil {
    		t.Fatal(err)
    	}
    	md5sum := r.MD5Current()
    	if hex.EncodeToString(md5sum) != "e2fc714c4727ee9395f324cd2e7f331f" {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Sep 18 17:00:54 GMT 2023
    - 10.3K bytes
    - Viewed (0)
  8. internal/bpool/bpool.go

    func (bp *BytePoolCap) Put(b []byte) {
    	if bp == nil {
    		return
    	}
    	select {
    	case bp.c <- b:
    		// buffer went back into pool
    	default:
    		// buffer didn't go back into pool, just discard
    	}
    }
    
    // Width returns the width of the byte arrays in this pool.
    func (bp *BytePoolCap) Width() (n int) {
    	if bp == nil {
    		return 0
    	}
    	return bp.w
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Apr 19 16:44:59 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CookiesTest.kt

        val cookie = cookies[0]
        assertThat(cookie.name).isEqualTo("a")
        assertThat(cookie.value).isEqualTo("android")
        assertThat(cookie.comment).isNull()
        assertThat(cookie.commentURL).isNull()
        assertThat(cookie.discard).isFalse()
        assertThat(cookie.maxAge).isGreaterThan(100000000000L)
        assertThat(cookie.path).isEqualTo("/path")
        assertThat(cookie.secure).isTrue()
        assertThat(cookie.version).isEqualTo(0)
      }
    
      @Test
    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)
  10. internal/ioutil/ioutil_test.go

    	}
    }
    
    func TestCloseOnWriter(t *testing.T) {
    	writer := WriteOnClose(io.Discard)
    	if writer.HasWritten() {
    		t.Error("WriteOnCloser must not be marked as HasWritten")
    	}
    	writer.Write(nil)
    	if !writer.HasWritten() {
    		t.Error("WriteOnCloser must be marked as HasWritten")
    	}
    
    	writer = WriteOnClose(io.Discard)
    	writer.Close()
    	if !writer.HasWritten() {
    		t.Error("WriteOnCloser must be marked as HasWritten")
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 02 11:02:31 GMT 2024
    - 5.1K bytes
    - Viewed (0)
Back to top