- Sort Score
- Result 10 results
- Languages All
Results 71 - 80 of 3,379 for FClose (0.11 sec)
-
src/net/http/httptest/example_test.go
ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Hello, client") })) defer ts.Close() res, err := http.Get(ts.URL) if err != nil { log.Fatal(err) } greeting, err := io.ReadAll(res.Body) res.Body.Close() if err != nil { log.Fatal(err) } fmt.Printf("%s", greeting) // Output: Hello, client } func ExampleServer_hTTP2() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 2K bytes - Viewed (0) -
src/compress/lzw/writer_test.go
} if err := w.Close(); err != nil { t.Errorf("close: %v", err) } b1 := buf.Bytes() buf.Reset() w.(*Writer).Reset(&buf, order, litWidth) if _, err := w.Write(data); err != nil { t.Errorf("write: %v: %v", string(data), err) } if err := w.Close(); err != nil { t.Errorf("close: %v", err) } b2 := buf.Bytes()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 12 11:00:47 UTC 2021 - 5.7K bytes - Viewed (0) -
src/net/splice_linux_test.go
t.Skip("skipping test on unix socket") } hook := hookSplice(t) clientUp, serverUp := spawnTestSocketPair(t, upNet) defer clientUp.Close() clientDown, serverDown := spawnTestSocketPair(t, downNet) defer clientDown.Close() defer serverDown.Close() serverUp.Close() // We'd like to call net.spliceFrom here and check the handled return // value, but we disable splice on old Linux kernels. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:49:26 UTC 2024 - 14.5K bytes - Viewed (0) -
src/main/java/org/codelibs/core/io/CloseableUtil.java
Registered: Wed Jun 12 12:50:12 UTC 2024 - Last Modified: Thu Mar 07 01:59:08 UTC 2024 - 2.5K bytes - Viewed (0) -
src/cmd/go/internal/lockedfile/lockedfile.go
func Edit(name string) (*File, error) { return OpenFile(name, os.O_RDWR|os.O_CREATE, 0666) } // Close unlocks and closes the underlying file. // // Close may be called multiple times; all calls after the first will return a // non-nil error. func (f *File) Close() error { if f.closed { return &fs.PathError{ Op: "close", Path: f.Name(), Err: fs.ErrClosed, } } f.closed = true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 5.1K bytes - Viewed (0) -
src/net/http/httputil/persist.go
if err != nil { if err == io.ErrUnexpectedEOF { // A close from the opposing client is treated as a // graceful close, even if there was some unparse-able // data before the close. sc.re = ErrPersistEOF return nil, sc.re } else { sc.re = err return req, err } } sc.lastbody = req.Body sc.nread++ if req.Close { sc.re = ErrPersistEOF return req, sc.re }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 11.1K bytes - Viewed (0) -
src/net/ipsock_plan9.go
} if err != nil { f.Close() return nil, err } data, err := os.OpenFile(netdir+"/"+proto+"/"+name+"/data", os.O_RDWR, 0) if err != nil { f.Close() return nil, err } laddr, err = readPlan9Addr(net, netdir+"/"+proto+"/"+name+"/local") if err != nil { data.Close() f.Close() return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 29 20:38:53 UTC 2023 - 7.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/ResponseBodyJvmTest.kt
return object : ForwardingSource(body.source()) { @Throws(IOException::class) override fun close() { closed.set(true) super.close() } }.buffer() } } body.charStream().close() assertThat(closed.get()).isTrue() } @Test fun readerClosedAfterBomClosesUnderlyingSource() {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 13K bytes - Viewed (0) -
platforms/core-execution/persistent-cache/src/test/groovy/org/gradle/cache/internal/DefaultPersistentDirectoryCacheTest.groovy
try { cache.open() } finally { cache.close() } then: 1 * initializationAction.accept(_ as PersistentCache) 0 * _ loadProperties(emptyDir.file("cache.properties")) == properties }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 14 16:40:49 UTC 2024 - 9.3K bytes - Viewed (0) -
test/closedchan.go
// Test close(c), receive of closed channel. // // TODO(rsc): Doesn't check behavior of close(c) when there // are blocked senders/receivers. package main import "os" var failed bool type Chan interface { Send(int) Nbsend(int) bool Recv() (int) Nbrecv() (int, bool) Recv2() (int, bool) Nbrecv2() (int, bool, bool) Close() Impl() string }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 17 04:48:57 UTC 2012 - 5.8K bytes - Viewed (0)