Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 195 for fd (0.06 sec)

  1. internal/http/dial_linux.go

    		c.Control(func(fdPtr uintptr) {
    			// got socket file descriptor to set parameters.
    			fd := int(fdPtr)
    
    			_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEADDR, 1)
    
    			_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_REUSEPORT, 1)
    
    			// Enable custom socket send/recv buffers.
    			if opts.SendBufSize > 0 {
    				_ = unix.SetsockoptInt(fd, unix.SOL_SOCKET, unix.SO_SNDBUF, opts.SendBufSize)
    			}
    
    			if opts.RecvBufSize > 0 {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 22 23:07:14 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  2. src/runtime/time_fake.go

    // on write calls.
    //
    //go:nowritebarrierrec
    func write(fd uintptr, p unsafe.Pointer, n int32) int32 {
    	if !(fd == 1 || fd == 2) {
    		// Do an ordinary write.
    		return write1(fd, p, n)
    	}
    
    	// Write with the playback header.
    
    	// First, lock to avoid interleaving writes.
    	lock(&faketimeState.lock)
    
    	// If the current fd doesn't match the fd of the previous write,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:15:13 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/sys/unix/zsyscall_zos_s390x.go

    	funcref := get_DirfdAddr()
    	if funcptrtest(GetZosLibVec()+SYS_DIRFD<<4, "") == 0 {
    		*funcref = impl_Dirfd
    	} else {
    		*funcref = error_Dirfd
    	}
    	return (*funcref)(dirp)
    }
    
    func error_Dirfd(dirp uintptr) (fd int, err error) {
    	fd = -1
    	err = ENOSYS
    	return
    }
    
    // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:12:58 UTC 2024
    - 88.2K bytes
    - Viewed (0)
  4. src/net/tcpsockopt_unix.go

    	if d == 0 {
    		d = defaultTCPKeepAliveInterval
    	} else if d < 0 {
    		return nil
    	}
    
    	// The kernel expects seconds so round to next highest second.
    	secs := int(roundDurationUp(d, time.Second))
    	err := fd.pfd.SetsockoptInt(syscall.IPPROTO_TCP, syscall.TCP_KEEPINTVL, secs)
    	runtime.KeepAlive(fd)
    	return wrapSyscallError("setsockopt", err)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:21 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  5. src/net/udpsock_posix.go

    	if c.fd.isConnected && addr != nil {
    		return 0, 0, ErrWriteToConnected
    	}
    	if !c.fd.isConnected && addr == nil {
    		return 0, 0, errMissingAddress
    	}
    	sa, err := addr.sockaddr(c.fd.family)
    	if err != nil {
    		return 0, 0, err
    	}
    	return c.fd.writeMsg(b, oob, sa)
    }
    
    func (c *UDPConn) writeMsgAddrPort(b, oob []byte, addr netip.AddrPort) (n, oobn int, err error) {
    	if c.fd.isConnected && addr.IsValid() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. src/net/tcpsock.go

    	}
    	return nil
    }
    
    // CloseWrite shuts down the writing side of the TCP connection.
    // Most callers should just use Close.
    func (c *TCPConn) CloseWrite() error {
    	if !c.ok() {
    		return syscall.EINVAL
    	}
    	if err := c.fd.closeWrite(); err != nil {
    		return &OpError{Op: "close", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
    	}
    	return nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  7. src/syscall/syscall_darwin.go

    //sys	Chroot(path string) (err error)
    //sys	Close(fd int) (err error)
    //sys	closedir(dir uintptr) (err error)
    //sys	Dup(fd int) (nfd int, err error)
    //sys	Dup2(from int, to int) (err error)
    //sys	Exchangedata(path1 string, path2 string, options int) (err error)
    //sys	Fchdir(fd int) (err error)
    //sys	Fchflags(fd int, flags int) (err error)
    //sys	Fchmod(fd int, mode uint32) (err error)
    //sys	Fchown(fd int, uid int, gid int) (err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:50 UTC 2024
    - 11K bytes
    - Viewed (0)
  8. cni/pkg/nodeagent/fakes_test.go

    type fakeNs struct {
    	closed *atomic.Bool
    	fd     uintptr
    	inode  uint64
    }
    
    func newFakeNs(fd uintptr) *fakeNs {
    	// the fake inode is the fd! magic.
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: uint64(fd)}
    }
    
    func newFakeNsInode(fd uintptr, inode uint64) *fakeNs {
    	return &fakeNs{closed: &atomic.Bool{}, fd: fd, inode: inode}
    }
    
    // Fd returns the file descriptor
    func (f *fakeNs) Fd() uintptr {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Apr 12 21:47:31 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  9. src/net/iprawsock_posix.go

    	}
    	sa, err := addr.sockaddr(c.fd.family)
    	if err != nil {
    		return 0, err
    	}
    	return c.fd.writeTo(b, sa)
    }
    
    func (c *IPConn) writeMsg(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
    	if c.fd.isConnected {
    		return 0, 0, ErrWriteToConnected
    	}
    	if addr == nil {
    		return 0, 0, errMissingAddress
    	}
    	sa, err := addr.sockaddr(c.fd.family)
    	if err != nil {
    		return 0, 0, err
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. src/runtime/debug/stack.go

    		// reissued the fd in a later call to open(2), leading
    		// to crashes being written to the wrong file.
    		//
    		// So, we duplicate the fd to obtain a private one
    		// that cannot be closed by the user.
    		// This also alleviates us from concerns about the
    		// lifetime and finalization of f.
    		// (DupCloseOnExec returns an fd, not a *File, so
    		// there is no finalizer, and we are responsible for
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 15:19:04 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top