Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for SetDeadline (0.11 sec)

  1. doc/next/6-stdlib/99-minor/os/15388.md

    which provides the following benefits for the resulting [File]:
    
    - I/O methods ([File.Read], [File.Write], [File.ReadAt], and [File.WriteAt]) do not block an OS thread.
    - Deadline methods ([File.SetDeadline], [File.SetReadDeadline], and [File.SetWriteDeadline]) are supported.
    
    This enhancement is especially beneficial for applications that communicate via named pipes on Windows.
    
    Registered: 2025-05-27 11:13
    - Last Modified: 2025-04-04 21:00
    - 926 bytes
    - Viewed (0)
  2. internal/deadlineconn/deadlineconn.go

    		return 0, context.DeadlineExceeded
    	}
    	c.setWriteDeadline()
    	n, err = c.Conn.Write(b)
    	return n, err
    }
    
    // SetDeadline will set the deadline for reads and writes.
    // A zero value for t means I/O operations will not time out.
    func (c *DeadlineConn) SetDeadline(t time.Time) error {
    	c.mu.Lock()
    	defer c.mu.Unlock()
    
    	c.readSetAt = time.Time{}
    	c.writeSetAt = time.Time{}
    Registered: 2025-05-25 19:28
    - Last Modified: 2024-12-02 13:21
    - 5.1K bytes
    - Viewed (0)
  3. api/go1.10.txt

    pkg net, method (*UnixListener) SyscallConn() (syscall.RawConn, error)
    pkg net/smtp, method (*Client) Noop() error
    pkg os, func IsTimeout(error) bool
    pkg os, method (*File) SetDeadline(time.Time) error
    pkg os, method (*File) SetReadDeadline(time.Time) error
    pkg os, method (*File) SetWriteDeadline(time.Time) error
    pkg os, method (*PathError) Timeout() bool
    pkg os, method (*SyscallError) Timeout() bool
    Registered: 2025-05-27 11:13
    - Last Modified: 2018-02-06 05:00
    - 30.1K bytes
    - Viewed (0)
  4. api/go1.txt

    pkg net, type Conn interface { Close, LocalAddr, Read, RemoteAddr, SetDeadline, SetReadDeadline, SetWriteDeadline, Write }
    pkg net, type Conn interface, Close() error
    pkg net, type Conn interface, LocalAddr() Addr
    pkg net, type Conn interface, Read([]uint8) (int, error)
    pkg net, type Conn interface, RemoteAddr() Addr
    pkg net, type Conn interface, SetDeadline(time.Time) error
    pkg net, type Conn interface, SetReadDeadline(time.Time) error
    Registered: 2025-05-27 11:13
    - Last Modified: 2013-08-14 18:58
    - 1.7M bytes
    - Viewed (0)
  5. internal/grid/grid.go

    			}
    			return b, err
    		}
    		read += int64(n)
    		if want >= 0 && read == want {
    			// No need to read more...
    			return b, nil
    		}
    	}
    }
    
    // getDeadline will truncate the deadline so it is at least 1ms and at most MaxDeadline.
    func getDeadline(d time.Duration) time.Duration {
    	if d < time.Millisecond {
    		return 0
    	}
    	if d > MaxDeadline {
    		return MaxDeadline
    	}
    	return d
    }
    
    Registered: 2025-05-25 19:28
    - Last Modified: 2025-03-30 00:56
    - 7K bytes
    - Viewed (0)
  6. internal/grid/connection.go

    func (c *Connection) newMuxClient(ctx context.Context) (*muxClient, error) {
    	client := newMuxClient(ctx, atomic.AddUint64(&c.NextID, 1), c)
    	if dl, ok := ctx.Deadline(); ok {
    		client.deadline = getDeadline(time.Until(dl))
    		if client.deadline == 0 {
    			client.cancelFn(context.DeadlineExceeded)
    			return nil, context.DeadlineExceeded
    		}
    	}
    	for {
    		// Handle the extremely unlikely scenario that we wrapped.
    Registered: 2025-05-25 19:28
    - Last Modified: 2025-04-18 09:10
    - 47K bytes
    - Viewed (0)
Back to top