Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 541 for fd (0.02 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/net/fd_windows.go

    	}
    	return n, nil
    }
    
    func (fd *netFD) writeBuffers(buf *Buffers) (int64, error) {
    	n, err := fd.pfd.Writev((*[][]byte)(buf))
    	runtime.KeepAlive(fd)
    	return n, wrapSyscallError("wsasend", err)
    }
    
    func (fd *netFD) accept() (*netFD, error) {
    	s, rawsa, rsan, errcall, err := fd.pfd.Accept(func() (syscall.Handle, error) {
    		return sysSocket(fd.family, fd.sotype, 0)
    	})
    
    	if err != nil {
    		if errcall != "" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 16:46:10 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. src/syscall/net_js.go

    package syscall
    
    func Socket(proto, sotype, unused int) (fd int, err error) {
    	return 0, ENOSYS
    }
    
    func Bind(fd int, sa Sockaddr) error {
    	return ENOSYS
    }
    
    func StopIO(fd int) error {
    	return ENOSYS
    }
    
    func Listen(fd int, backlog int) error {
    	return ENOSYS
    }
    
    func Accept(fd int) (newfd int, sa Sockaddr, err error) {
    	return 0, nil, ENOSYS
    }
    
    func Connect(fd int, sa Sockaddr) error {
    	return ENOSYS
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 25 00:12:41 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/sys/unix/ioctl_signed.go

    	return ioctlPtr(fd, req, unsafe.Pointer(value))
    }
    
    // IoctlSetTermios performs an ioctl on fd with a *Termios.
    //
    // The req value will usually be TCSETA or TIOCSETA.
    func IoctlSetTermios(fd int, req int, value *Termios) error {
    	// TODO: if we get the chance, remove the req parameter.
    	return ioctlPtr(fd, req, unsafe.Pointer(value))
    }
    
    // IoctlGetInt performs an ioctl operation which gets an integer value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/sys/unix/ioctl_unsigned.go

    	return ioctlPtr(fd, req, unsafe.Pointer(value))
    }
    
    // IoctlSetTermios performs an ioctl on fd with a *Termios.
    //
    // The req value will usually be TCSETA or TIOCSETA.
    func IoctlSetTermios(fd int, req uint, value *Termios) error {
    	// TODO: if we get the chance, remove the req parameter.
    	return ioctlPtr(fd, req, unsafe.Pointer(value))
    }
    
    // IoctlGetInt performs an ioctl operation which gets an integer value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
  6. src/net/writev_unix.go

    	if !c.ok() {
    		return 0, syscall.EINVAL
    	}
    	n, err := c.fd.writeBuffers(v)
    	if err != nil {
    		return n, &OpError{Op: "writev", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
    	}
    	return n, nil
    }
    
    func (fd *netFD) writeBuffers(v *Buffers) (n int64, err error) {
    	n, err = fd.pfd.Writev((*[][]byte)(v))
    	runtime.KeepAlive(fd)
    	return n, wrapSyscallError("writev", err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 07 16:48:35 UTC 2022
    - 666 bytes
    - Viewed (0)
  7. src/internal/poll/fd_windows_test.go

    	"syscall"
    	"testing"
    	"unsafe"
    )
    
    type loggedFD struct {
    	Net string
    	FD  *poll.FD
    	Err error
    }
    
    var (
    	logMu     sync.Mutex
    	loggedFDs map[syscall.Handle]*loggedFD
    )
    
    func logFD(net string, fd *poll.FD, err error) {
    	logMu.Lock()
    	defer logMu.Unlock()
    
    	loggedFDs[fd.Sysfd] = &loggedFD{
    		Net: net,
    		FD:  fd,
    		Err: err,
    	}
    }
    
    func init() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 14 08:33:36 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  8. src/net/iprawsock.go

    		return nil, syscall.EINVAL
    	}
    	return newRawConn(c.fd), nil
    }
    
    // ReadFromIP acts like ReadFrom but returns an IPAddr.
    func (c *IPConn) ReadFromIP(b []byte) (int, *IPAddr, error) {
    	if !c.ok() {
    		return 0, nil, syscall.EINVAL
    	}
    	n, addr, err := c.readFrom(b)
    	if err != nil {
    		err = &OpError{Op: "read", Net: c.fd.net, Source: c.fd.laddr, Addr: c.fd.raddr, Err: err}
    	}
    	return n, addr, err
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  9. src/net/file_unix.go

    		poll.CloseFunc(s)
    		return nil, syscall.EPROTONOSUPPORT
    	}
    	fd, err := newFD(s, family, sotype, "")
    	if err != nil {
    		poll.CloseFunc(s)
    		return nil, err
    	}
    	laddr := fd.addrFunc()(lsa)
    	raddr := fd.addrFunc()(rsa)
    	fd.net = laddr.Network()
    	if err := fd.init(); err != nil {
    		fd.Close()
    		return nil, err
    	}
    	fd.setAddr(laddr, raddr)
    	return fd, nil
    }
    
    func fileConn(f *os.File) (Conn, error) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go

    //sysnb	socket(domain int, typ int, proto int) (fd int, err error)
    //sysnb	socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
    //sysnb	getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
    //sysnb	getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
    //sys	recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 6.9K bytes
    - Viewed (0)
Back to top