Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for SOCK_NONBLOCK (0.14 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. 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)
  8. src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go

    	SIOCINQ                          = 0x541b
    	SIOCOUTQ                         = 0x5411
    	SIOCSPGRP                        = 0x8902
    	SOCK_CLOEXEC                     = 0x80000
    	SOCK_DGRAM                       = 0x2
    	SOCK_NONBLOCK                    = 0x800
    	SOCK_STREAM                      = 0x1
    	SOL_SOCKET                       = 0x1
    	SO_ACCEPTCONN                    = 0x1e
    	SO_ATTACH_BPF                    = 0x32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_386.go

    	SIOCINQ                          = 0x541b
    	SIOCOUTQ                         = 0x5411
    	SIOCSPGRP                        = 0x8902
    	SOCK_CLOEXEC                     = 0x80000
    	SOCK_DGRAM                       = 0x2
    	SOCK_NONBLOCK                    = 0x800
    	SOCK_STREAM                      = 0x1
    	SOL_SOCKET                       = 0x1
    	SO_ACCEPTCONN                    = 0x1e
    	SO_ATTACH_BPF                    = 0x32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 34.2K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go

    	SIOCINQ                          = 0x541b
    	SIOCOUTQ                         = 0x5411
    	SIOCSPGRP                        = 0x8902
    	SOCK_CLOEXEC                     = 0x80000
    	SOCK_DGRAM                       = 0x2
    	SOCK_NONBLOCK                    = 0x800
    	SOCK_STREAM                      = 0x1
    	SOL_SOCKET                       = 0x1
    	SO_ACCEPTCONN                    = 0x1e
    	SO_ATTACH_BPF                    = 0x32
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 19:00:13 UTC 2024
    - 34.4K bytes
    - Viewed (0)
Back to top