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