package poll

Import Path
	internal/poll (on golang.org and go.dev)

Dependency Relation
	imports 8 packages, and imported by 2 packages

Involved Source Files
	    copy_file_range_linux.go
	    errno_unix.go
	    fcntl_syscall.go
	d-> fd.go
	    fd_fsync_posix.go
	    fd_mutex.go
	    fd_poll_runtime.go
	    fd_posix.go
	    fd_unix.go
	    fd_writev_unix.go
	    hook_cloexec.go
	    hook_unix.go
	    sendfile_linux.go
	    sock_cloexec.go
	    sockopt.go
	    sockopt_linux.go
	    sockopt_unix.go
	    sockoptip.go
	    splice_linux.go
	    writev.go

Exported Type Names

type DeadlineExceededError (struct) DeadlineExceededError is returned for an expired deadline. (*T) Error() string (*T) Temporary() bool (*T) Timeout() bool *T : error *T : net.Error
type FD (struct) FD is a file descriptor. The net and os packages use this type as a field of a larger type representing a network connection or OS file. IsStream bool Sysfd int ZeroReadIsEOF bool (*T) Accept() (int, syscall.Sockaddr, string, error) (*T) Close() error (*T) Dup() (int, string, error) (*T) Fchdir() error (*T) Fchmod(mode uint32) error (*T) Fchown(uid, gid int) error (*T) Fstat(s *syscall.Stat_t) error (*T) Fsync() error (*T) Ftruncate(size int64) error (*T) Init(net string, pollable bool) error (*T) Pread(p []byte, off int64) (int, error) (*T) Pwrite(p []byte, off int64) (int, error) (*T) RawControl(f func(uintptr)) error (*T) RawRead(f func(uintptr) bool) error (*T) RawWrite(f func(uintptr) bool) error (*T) Read(p []byte) (int, error) (*T) ReadDirent(buf []byte) (int, error) (*T) ReadFrom(p []byte) (int, syscall.Sockaddr, error) (*T) ReadMsg(p []byte, oob []byte) (int, int, int, syscall.Sockaddr, error) (*T) Seek(offset int64, whence int) (int64, error) (*T) SetBlocking() error (*T) SetDeadline(t time.Time) error (*T) SetReadDeadline(t time.Time) error (*T) SetWriteDeadline(t time.Time) error (*T) SetsockoptByte(level, name int, arg byte) error (*T) SetsockoptIPMreq(level, name int, mreq *syscall.IPMreq) error (*T) SetsockoptIPMreqn(level, name int, mreq *syscall.IPMreqn) error (*T) SetsockoptIPv6Mreq(level, name int, mreq *syscall.IPv6Mreq) error (*T) SetsockoptInet4Addr(level, name int, arg [4]byte) error (*T) SetsockoptInt(level, name, arg int) error (*T) SetsockoptLinger(level, name int, l *syscall.Linger) error (*T) Shutdown(how int) error (*T) WaitWrite() error (*T) Write(p []byte) (int, error) (*T) WriteMsg(p []byte, oob []byte, sa syscall.Sockaddr) (int, int, error) (*T) WriteOnce(p []byte) (int, error) (*T) WriteTo(p []byte, sa syscall.Sockaddr) (int, error) (*T) Writev(v *[][]byte) (int64, error) *T : io.Closer *T : io.ReadCloser *T : io.Reader *T : io.ReadSeeker *T : io.ReadWriteCloser *T : io.ReadWriter *T : io.ReadWriteSeeker *T : io.Seeker *T : io.WriteCloser *T : io.Writer *T : io.WriteSeeker func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err error) func SendFile(dstFD *FD, src int, remain int64) (int64, error) func Splice(dst, src *FD, remain int64) (written int64, handled bool, sc string, err error)
Exported Values
var Accept4Func (int, int) (int, syscall.Sockaddr, error) Accept4Func is used to hook the accept4 call.
var AcceptFunc (int) (int, syscall.Sockaddr, error) AcceptFunc is used to hook the accept call.
var CloseFunc (int) error CloseFunc is used to hook the close call.
func CopyFileRange(dst, src *FD, remain int64) (written int64, handled bool, err error) CopyFileRange copies at most remain bytes of data from src to dst, using the copy_file_range system call. dst and src must refer to regular files.
func DupCloseOnExec(fd int) (int, string, error) DupCloseOnExec dups fd and marks it close-on-exec.
var ErrDeadlineExceeded error ErrDeadlineExceeded is returned for an expired deadline. This is exported by the os package as os.ErrDeadlineExceeded.
var ErrFileClosing error ErrFileClosing is returned when a file descriptor is used after it has been closed.
var ErrNetClosing error ErrNetClosing is returned when a network descriptor is used after it has been closed. Keep this string consistent because of issue #4373: since historically programs have not been able to detect this error, they look for the string.
var ErrNoDeadline error ErrNoDeadline is returned when a request is made to set a deadline on a file type that does not use the poller.
var ErrNotPollable error ErrNotPollable is returned when the file or socket is not suitable for event notification.
func IsPollDescriptor(fd uintptr) bool IsPollDescriptor reports whether fd is the descriptor being used by the poller. This is only used for testing.
func SendFile(dstFD *FD, src int, remain int64) (int64, error) SendFile wraps the sendfile system call.
func Splice(dst, src *FD, remain int64) (written int64, handled bool, sc string, err error) Splice transfers at most remain bytes of data from src to dst, using the splice system call to minimize copies of data from and to userspace. Splice creates a temporary pipe, to serve as a buffer for the data transfer. src and dst must both be stream-oriented sockets. If err != nil, sc is the system call which caused the error.
var TestHookDidWritev func(wrote int) TestHookDidWritev is a hook for testing writev.