- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for WithReadDeadline (0.84 sec)
-
internal/deadlineconn/deadlineconn_test.go
defer wg.Done() tcpConn, terr := tcpListener.AcceptTCP() if terr != nil { t.Errorf("failed to accept new connection. %v", terr) return } deadlineconn := New(tcpConn) deadlineconn.WithReadDeadline(time.Second) deadlineconn.WithWriteDeadline(time.Second) defer deadlineconn.Close() // Read a line b := make([]byte, 12) _, terr = deadlineconn.Read(b) if terr != nil {
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Mon Nov 11 17:15:17 UTC 2024 - 4.8K bytes - Viewed (0) -
internal/deadlineconn/deadlineconn.go
func (c *DeadlineConn) Close() error { c.abortReads.Store(true) c.abortWrites.Store(true) return c.Conn.Close() } // WithReadDeadline sets a new read side net.Conn deadline. func (c *DeadlineConn) WithReadDeadline(d time.Duration) *DeadlineConn { c.readDeadline = d return c } // WithWriteDeadline sets a new write side net.Conn deadline.
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Mon Dec 02 13:21:17 UTC 2024 - 5.1K bytes - Viewed (0) -
internal/http/dial_linux.go
if opts.DriveOPTimeout != nil { // Read deadlines are sufficient for now as per various // scenarios of hung node detection, we may add Write deadlines // if needed later on. return deadlineconn.New(conn).WithReadDeadline(opts.DriveOPTimeout()), nil } return conn, nil }Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Tue Jul 23 10:53:03 UTC 2024 - 5K bytes - Viewed (0) -
internal/http/listener.go
func (listener *httpListener) Accept() (conn net.Conn, err error) { select { case result := <-listener.acceptCh: if result.err != nil { return nil, result.err } return deadlineconn.New(result.conn).WithReadDeadline(listener.opts.IdleTimeout).WithWriteDeadline(listener.opts.IdleTimeout), result.err case <-listener.ctxDoneCh: } return nil, syscall.EINVAL } // Close - closes underneath all TCP listeners.
Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Sep 28 20:59:21 UTC 2025 - 5.8K bytes - Viewed (0)