Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 81 for SOCK_NONBLOCK (0.23 sec)

  1. src/internal/syscall/unix/kernel_version_solaris.go

    	return
    }
    
    // SupportSockNonblockCloexec tests if SOCK_NONBLOCK and SOCK_CLOEXEC are supported
    // for socket() system call, returns true if affirmative.
    var SupportSockNonblockCloexec = sync.OnceValue(func() bool {
    	// First test if socket() supports SOCK_NONBLOCK and SOCK_CLOEXEC directly.
    	s, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM|syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC, 0)
    	if err == nil {
    		syscall.Close(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 03:10:07 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  2. src/internal/syscall/unix/kernel_version_solaris_test.go

    	"runtime"
    	"syscall"
    	"testing"
    )
    
    func TestSupportSockNonblockCloexec(t *testing.T) {
    	// Test that SupportSockNonblockCloexec returns true if socket succeeds with SOCK_NONBLOCK and SOCK_CLOEXEC.
    	s, err := syscall.Socket(syscall.AF_INET, syscall.SOCK_STREAM|syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC, 0)
    	if err == nil {
    		syscall.Close(s)
    	}
    	wantSock := err != syscall.EPROTONOSUPPORT && err != syscall.EINVAL
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  3. src/net/sock_cloexec.go

    )
    
    // Wrapper around the socket system call that marks the returned file
    // descriptor as nonblocking and close-on-exec.
    func sysSocket(family, sotype, proto int) (int, error) {
    	s, err := socketFunc(family, sotype|syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC, proto)
    	if err != nil {
    		return -1, os.NewSyscallError("socket", err)
    	}
    	return s, nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 730 bytes
    - Viewed (0)
  4. src/internal/poll/sock_cloexec.go

    // Wrapper around the accept system call that marks the returned file
    // descriptor as nonblocking and close-on-exec.
    func accept(s int) (int, syscall.Sockaddr, string, error) {
    	ns, sa, err := Accept4Func(s, syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC)
    	if err != nil {
    		return -1, nil, "accept4", err
    	}
    	return ns, sa, "", nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 712 bytes
    - Viewed (0)
  5. src/internal/poll/sock_cloexec_solaris.go

    func accept(s int) (int, syscall.Sockaddr, string, error) {
    	// Perform a cheap test and try the fast path first.
    	if unix.SupportAccept4() {
    		ns, sa, err := Accept4Func(s, syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC)
    		if err != nil {
    			return -1, nil, "accept4", err
    		}
    		return ns, sa, "", nil
    	}
    
    	// See ../syscall/exec_unix.go for description of ForkLock.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  6. src/net/sock_cloexec_solaris.go

    func sysSocket(family, sotype, proto int) (int, error) {
    	// Perform a cheap test and try the fast path first.
    	if unix.SupportSockNonblockCloexec() {
    		s, err := socketFunc(family, sotype|syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC, proto)
    		if err != nil {
    			return -1, os.NewSyscallError("socket", err)
    		}
    		return s, nil
    	}
    
    	// See ../syscall/exec_unix.go for description of ForkLock.
    	syscall.ForkLock.RLock()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Apr 14 18:17:25 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. api/go1.11.txt

    pkg syscall (openbsd-386), const SOCK_CLOEXEC = 32768
    pkg syscall (openbsd-386), const SOCK_CLOEXEC ideal-int
    pkg syscall (openbsd-386), const SOCK_NONBLOCK = 16384
    pkg syscall (openbsd-386), const SOCK_NONBLOCK ideal-int
    pkg syscall (openbsd-386), const SYS_ACCEPT4 = 93
    pkg syscall (openbsd-386), const SYS_ACCEPT4 ideal-int
    pkg syscall (openbsd-386), const SYS_PIPE2 = 101
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 22 03:48:56 UTC 2018
    - 25K bytes
    - Viewed (0)
  8. src/internal/poll/sock_cloexec_accept.go

    // Wrapper around the accept system call that marks the returned file
    // descriptor as nonblocking and close-on-exec.
    func accept(s int) (int, syscall.Sockaddr, string, error) {
    	ns, sa, err := Accept4Func(s, syscall.SOCK_NONBLOCK|syscall.SOCK_CLOEXEC)
    	switch err {
    	case nil:
    		return ns, sa, "", nil
    	default: // errors other than the ones listed
    		return -1, sa, "accept4", err
    	case syscall.ENOSYS: // syscall missing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 16 03:40:42 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  9. api/go1.3.txt

    pkg syscall (freebsd-386), const SIGLIBRT Signal
    pkg syscall (freebsd-386), const SOCK_CLOEXEC = 268435456
    pkg syscall (freebsd-386), const SOCK_CLOEXEC ideal-int
    pkg syscall (freebsd-386), const SOCK_NONBLOCK = 536870912
    pkg syscall (freebsd-386), const SOCK_NONBLOCK ideal-int
    pkg syscall (freebsd-386), const SO_VENDOR = 2147483648
    pkg syscall (freebsd-386), const SO_VENDOR ideal-int
    pkg syscall (freebsd-386), const SYS_ACCEPT4 = 541
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 02 02:45:00 UTC 2014
    - 117K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go

    	SIOCINQ                          = 0x467f
    	SIOCOUTQ                         = 0x7472
    	SIOCSPGRP                        = 0x80047308
    	SOCK_CLOEXEC                     = 0x80000
    	SOCK_DGRAM                       = 0x1
    	SOCK_NONBLOCK                    = 0x80
    	SOCK_STREAM                      = 0x2
    	SOL_SOCKET                       = 0xffff
    	SO_ACCEPTCONN                    = 0x1009
    	SO_ATTACH_BPF                    = 0x32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 34.7K bytes
    - Viewed (0)
Back to top