Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for readDeadline (0.06 sec)

  1. internal/deadlineconn/deadlineconn.go

    type DeadlineConn struct {
    	net.Conn
    	readDeadline  time.Duration // sets the read deadline on a connection.
    	readSetAt     time.Time
    	writeDeadline time.Duration // sets the write deadline on a connection.
    	writeSetAt    time.Time
    }
    
    // Sets read deadline
    func (c *DeadlineConn) setReadDeadline() {
    	if c.readDeadline > 0 {
    		now := time.Now()
    		if now.Sub(c.readSetAt) > updateInterval {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 17:40:11 UTC 2024
    - 2.6K bytes
    - Viewed (0)
Back to top