Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for unixgram (0.31 sec)

  1. src/net/packetconn_test.go

    	var packetConnTests = []struct {
    		net   string
    		addr1 string
    		addr2 string
    	}{
    		{"udp", "127.0.0.1:0", "127.0.0.1:0"},
    		{"unixgram", testUnixAddr(t), testUnixAddr(t)},
    	}
    
    	closer := func(c PacketConn, net, addr1, addr2 string) {
    		c.Close()
    		switch net {
    		case "unixgram":
    			os.Remove(addr1)
    			os.Remove(addr2)
    		}
    	}
    
    	for _, tt := range packetConnTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 3K bytes
    - Viewed (0)
  2. src/net/protoconn_test.go

    	}
    }
    
    func TestUnixConnSpecificMethods(t *testing.T) {
    	if !testableNetwork("unixgram") {
    		t.Skip("unixgram test")
    	}
    
    	addr1, addr2, addr3 := testUnixAddr(t), testUnixAddr(t), testUnixAddr(t)
    
    	a1, err := ResolveUnixAddr("unixgram", addr1)
    	if err != nil {
    		t.Fatal(err)
    	}
    	c1, err := DialUnix("unixgram", a1, nil)
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer c1.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 7.4K bytes
    - Viewed (0)
  3. src/vendor/golang.org/x/net/nettest/nettest.go

    		switch runtime.GOOS {
    		case "fuchsia", "hurd", "js", "nacl", "plan9", "wasip1":
    			return false
    		default:
    			if os.Getuid() != 0 {
    				return false
    			}
    		}
    	case "unix", "unixgram":
    		switch runtime.GOOS {
    		case "android", "fuchsia", "hurd", "ios", "js", "nacl", "plan9", "wasip1", "windows":
    			return false
    		case "aix":
    			return unixStrmDgramEnabled()
    		}
    	case "unixpacket":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. src/net/file_test.go

    		wg.Wait()
    		if !reflect.DeepEqual(ln2.Addr(), addr) {
    			t.Fatalf("got %#v; want %#v", ln2.Addr(), addr)
    		}
    	}
    }
    
    var filePacketConnTests = []struct {
    	network string
    }{
    	{"udp"},
    	{"unixgram"},
    }
    
    func TestFilePacketConn(t *testing.T) {
    	switch runtime.GOOS {
    	case "plan9", "windows", "js", "wasip1":
    		t.Skipf("not supported on %s", runtime.GOOS)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  5. src/net/unixsock_posix.go

    	var sotype int
    	switch net {
    	case "unix":
    		sotype = syscall.SOCK_STREAM
    	case "unixgram":
    		sotype = syscall.SOCK_DGRAM
    	case "unixpacket":
    		sotype = syscall.SOCK_SEQPACKET
    	default:
    		return nil, UnknownNetworkError(net)
    	}
    
    	switch mode {
    	case "dial":
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:54:32 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. src/net/platform_test.go

    	switch net {
    	case "ip+nopriv":
    	case "ip", "ip4", "ip6":
    		switch runtime.GOOS {
    		case "plan9":
    			return false
    		default:
    			if os.Getuid() != 0 {
    				return false
    			}
    		}
    	case "unix", "unixgram":
    		switch runtime.GOOS {
    		case "android", "ios", "plan9", "windows":
    			return false
    		case "aix":
    			return unixEnabledOnAIX
    		}
    	case "unixpacket":
    		switch runtime.GOOS {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  7. src/log/syslog/syslog.go

    			w.hostname = "localhost"
    		}
    	} else {
    		var c net.Conn
    		c, err = net.Dial(w.network, w.raddr)
    		if err == nil {
    			w.conn = &netConn{
    				conn:  c,
    				local: w.network == "unixgram" || w.network == "unix",
    			}
    			if w.hostname == "" {
    				w.hostname = c.LocalAddr().String()
    			}
    		}
    	}
    	return
    }
    
    // Write sends a log message to the syslog daemon.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 23 22:56:07 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  8. src/net/sock_posix.go

    		}
    	}
    	if err := fd.dial(ctx, laddr, raddr, ctrlCtxFn); err != nil {
    		fd.Close()
    		return nil, err
    	}
    	return fd, nil
    }
    
    func (fd *netFD) ctrlNetwork() string {
    	switch fd.net {
    	case "unix", "unixgram", "unixpacket":
    		return fd.net
    	}
    	switch fd.net[len(fd.net)-1] {
    	case '4', '6':
    		return fd.net
    	}
    	if fd.family == syscall.AF_INET {
    		return fd.net + "4"
    	}
    	return fd.net + "6"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 6.3K bytes
    - Viewed (0)
Back to top