Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for SetWriteDeadline (0.14 sec)

  1. internal/deadlineconn/deadlineconn.go

    			c.Conn.SetReadDeadline(now.Add(c.readDeadline + updateInterval))
    			c.readSetAt = now
    		}
    	}
    }
    
    func (c *DeadlineConn) setWriteDeadline() {
    	if c.writeDeadline > 0 {
    		now := time.Now()
    		if now.Sub(c.writeSetAt) > updateInterval {
    			c.Conn.SetWriteDeadline(now.Add(c.writeDeadline + updateInterval))
    			c.writeSetAt = now
    		}
    	}
    }
    
    // Read - reads data from the connection using wrapped buffered reader.
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Jul 26 17:40:11 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  2. internal/grid/connection.go

    		now := time.Now()
    		// Only set write deadline once every second
    		if now.Sub(lastSetDeadline) > time.Second {
    			err := conn.SetWriteDeadline(now.Add(connWriteTimeout + time.Second))
    			if err != nil {
    				gridLogIf(ctx, fmt.Errorf("conn.SetWriteDeadline: %w", err))
    				return false
    			}
    			lastSetDeadline = now
    		}
    
    		_, err := buf.WriteTo(conn)
    		if err != nil {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Mon Jul 29 18:10:04 UTC 2024
    - 46.7K bytes
    - Viewed (0)
  3. cni/pkg/nodeagent/ztunnelserver.go

    }
    
    func (z *ZtunnelConnection) sendDataAndWaitForAck(data []byte, fd *int) (*zdsapi.WorkloadResponse, error) {
    	var rights []byte
    	if fd != nil {
    		rights = unix.UnixRights(*fd)
    	}
    	err := z.u.SetWriteDeadline(time.Now().Add(readWriteDeadline))
    	if err != nil {
    		return nil, err
    	}
    
    	_, _, err = z.u.WriteMsgUnix(data, rights, nil)
    	if err != nil {
    		return nil, err
    	}
    
    	// wait for ack
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Mon Jul 29 16:08:35 UTC 2024
    - 13.2K bytes
    - Viewed (0)
Back to top