Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for unixgram (0.13 sec)

  1. src/net/unixsock_test.go

    		t.Fatalf("got %v; want %v", b[:n], data[:])
    	}
    }
    
    func TestUnixgramZeroBytePayload(t *testing.T) {
    	if !testableNetwork("unixgram") {
    		t.Skip("unixgram test")
    	}
    
    	c1 := newLocalPacketListener(t, "unixgram")
    	defer os.Remove(c1.LocalAddr().String())
    	defer c1.Close()
    
    	c2, err := Dial("unixgram", c1.LocalAddr().String())
    	if err != nil {
    		t.Fatal(err)
    	}
    	defer os.Remove(c2.LocalAddr().String())
    	defer c2.Close()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  2. src/net/unixsock.go

    // BUG(mikio): On Windows, methods and functions related to UnixConn
    // and UnixListener don't work for "unixgram" and "unixpacket".
    
    // UnixAddr represents the address of a Unix domain socket end point.
    type UnixAddr struct {
    	Name string
    	Net  string
    }
    
    // Network returns the address's network name, "unix", "unixgram" or
    // "unixpacket".
    func (a *UnixAddr) Network() string {
    	return a.Net
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. src/net/server_test.go

    		{saddr: "@nettest/go/unixgram/server", caddr: "@nettest/go/unixgram/client"},
    	}
    
    	for i, tt := range unixgramServerTests {
    		i, tt := i, tt
    		t.Run(fmt.Sprint(i), func(t *testing.T) {
    			if !testableListenArgs("unixgram", tt.saddr, "") {
    				t.Skipf("skipping unixgram %s<-%s test", tt.saddr, tt.caddr)
    			}
    			t.Logf("unixgram %s<-%s", tt.saddr, tt.caddr)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 11.7K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. src/net/mockserver_test.go

    		ch <- err
    		return
    	}
    	if peer == nil { // for connected-mode sockets
    		switch c.LocalAddr().Network() {
    		case "udp":
    			peer, err = ResolveUDPAddr("udp", string(b[:n]))
    		case "unixgram":
    			peer, err = ResolveUnixAddr("unixgram", string(b[:n]))
    		}
    		if err != nil {
    			ch <- err
    			return
    		}
    	}
    	if _, err := c.WriteTo(b[:n], peer); err != nil {
    		if perr := parseWriteError(err); perr != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 20 06:04:31 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top