- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for closeWrite (0.41 sec)
-
src/crypto/tls/tls_test.go
return fmt.Errorf("Read data = %q; want nothing", data) } if err := srv.CloseWrite(); err != nil { return fmt.Errorf("server CloseWrite: %v", err) } // Wait for clientCloseWrite to finish, so we know we // tested the CloseWrite before we defer the // sconn.Close above, which would also cause the // client to unblock like CloseWrite. <-clientDoneChan return nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 60.5K bytes - Viewed (0) -
src/net/tcpsock.go
} return nil } // CloseWrite shuts down the writing side of the TCP connection. // Most callers should just use Close. func (c *TCPConn) CloseWrite() error { if !c.ok() { return syscall.EINVAL } if err := c.fd.closeWrite(); err != nil { return &OpError{Op: "close", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 15 03:10:07 UTC 2024 - 13.7K bytes - Viewed (0) -
src/net/http/export_test.go
// if needed. rstAvoidanceDelay = 1 * time.Nanosecond } // SetRSTAvoidanceDelay sets how long we are willing to wait between calling // CloseWrite on a connection and fully closing the connection. func SetRSTAvoidanceDelay(t *testing.T, d time.Duration) { prevDelay := rstAvoidanceDelay t.Cleanup(func() { rstAvoidanceDelay = prevDelay })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 17 21:11:57 UTC 2024 - 8.7K bytes - Viewed (0) -
src/crypto/tls/conn.go
return alertErr } var errEarlyCloseWrite = errors.New("tls: CloseWrite called before handshake complete") // CloseWrite shuts down the writing side of the connection. It should only be // called once the handshake has completed and does not call CloseWrite on the // underlying connection. Most callers should just use [Conn.Close]. func (c *Conn) CloseWrite() error { if !c.isHandshakeComplete.Load() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 51.8K bytes - Viewed (0) -
src/net/http/serve_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0) -
src/net/http/server.go
// // TODO(bcmills): This should arguably be a server configuration parameter, // not a hard-coded value. var rstAvoidanceDelay = 500 * time.Millisecond type closeWriter interface { CloseWrite() error } var _ closeWriter = (*net.TCPConn)(nil) // closeWriteAndWait flushes any outstanding data and sends a FIN packet (if // client is connected via TCP), signaling that we're done. We then
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 123.4K bytes - Viewed (0) -
internal/ringbuffer/README.md
`TryRead` and `TryWrite` are still available for non-blocking reads and writes. To signify the end of the stream, close the ring buffer from the writer side with `rb.CloseWriter()` Either side can use `rb.CloseWithError(err error)` to signal an error and close the ring buffer. Any reads or writes will return the error on next call.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 2.1K bytes - Viewed (0) -
src/net/http/h2_bundle.go
if clientGone { // TODO: could we also get into this state if // the peer does a half close // (e.g. CloseWrite) because they're done // sending frames but they're still wanting // our open replies? Investigate. // TODO: add CloseWrite to crypto/tls.Conn first // so we have a way to test this? I suppose // just for testing we could have a non-TLS mode. return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer.go
// and always returns nil. func (r *RingBuffer) CloseWithError(err error) { if err == nil { err = io.EOF } r.setErr(err, false) } // CloseWriter closes the writer. // Reads will return any remaining bytes and io.EOF. func (r *RingBuffer) CloseWriter() { r.setErr(io.EOF, false) } // Flush waits for the buffer to be empty and fully read.
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 13.3K bytes - Viewed (0) -
internal/ringbuffer/ring_buffer_test.go
} if doSleep && writeRng.Intn(10) == 0 { time.Sleep(time.Duration(writeRng.Intn(maxSleep))) } } if err := rb.Flush(); err != nil { t.Fatalf("flush failed: %v", err) } rb.CloseWriter() } wg.Wait() if !errors.Is(readErr, io.EOF) { t.Fatalf("expect io.EOF but got %v", readErr) } if readBytes != wroteBytes { a, b := readBuf.Bytes(), wroteBuf.Bytes()
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed May 15 00:11:04 UTC 2024 - 26.8K bytes - Viewed (0)