1 // Copyright 2009 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.
9 // Setsockopt wraps the setsockopt network call.
10 func (fd
*FD
) Setsockopt(level
, optname
int32, optval
*byte, optlen
int32) error
{
11 if err
:= fd
.incref(); err
!= nil {
15 return syscall
.Setsockopt(fd
.Sysfd
, level
, optname
, optval
, optlen
)
18 // WSAIoctl wraps the WSAIoctl network call.
19 func (fd
*FD
) WSAIoctl(iocc
uint32, inbuf
*byte, cbif
uint32, outbuf
*byte, cbob
uint32, cbbr
*uint32, overlapped
*syscall
.Overlapped
, completionRoutine
uintptr) error
{
20 if err
:= fd
.incref(); err
!= nil {
24 return syscall
.WSAIoctl(fd
.Sysfd
, iocc
, inbuf
, cbif
, outbuf
, cbob
, cbbr
, overlapped
, completionRoutine
)