1 // Copyright 2017 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 TestRawConn(t
*testing
.T
) {
13 c
, err
:= newLocalPacketListener("udp")
18 cc
, err
:= c
.(*UDPConn
).SyscallConn()
24 fn
:= func(s
uintptr) {
25 operr
= syscall
.SetsockoptInt(syscall
.Handle(s
), syscall
.SOL_SOCKET
, syscall
.SO_REUSEADDR
, 1)
28 if err
!= nil || operr
!= nil {
34 t
.Fatal("should fail")