1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 func TestMulticastJoinAndLeave(t *testing.T) {
13 if runtime.GOOS == "windows" {
22 conn, err := ListenUDP("udp4", addr)
29 mcast := IPv4(224, 0, 0, 254)
30 err = conn.JoinGroup(mcast)
36 err = conn.LeaveGroup(mcast)
42 func TestJoinFailureWithIPv6Address(t *testing.T) {
49 conn, err := ListenUDP("udp4", addr)
56 mcast := ParseIP("ff02::1")
57 err = conn.JoinGroup(mcast)
59 t.Fatal("JoinGroup succeeded, should fail")