- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for WithReadDeadline (0.08 sec)
-
internal/deadlineconn/deadlineconn.go
// Write - writes data to the connection. func (c *DeadlineConn) Write(b []byte) (n int, err error) { c.setWriteDeadline() n, err = c.Conn.Write(b) return n, err } // 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Jul 26 17:40:11 UTC 2024 - 2.6K 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 Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Jul 23 10:53:03 UTC 2024 - 5K bytes - Viewed (0) -
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 Nov 03 19:28:11 UTC 2024 - Last Modified: Sat Nov 05 18:09:21 UTC 2022 - 3K bytes - Viewed (0)