github.com/go-asm/go@v1.21.1-0.20240213172139-40c5ead50c48/poll/sockopt_windows.go (about)

     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.
     4  
     5  package poll
     6  
     7  import "syscall"
     8  
     9  // WSAIoctl wraps the WSAIoctl network call.
    10  func (fd *FD) WSAIoctl(iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *syscall.Overlapped, completionRoutine uintptr) error {
    11  	if err := fd.incref(); err != nil {
    12  		return err
    13  	}
    14  	defer fd.decref()
    15  	return syscall.WSAIoctl(fd.Sysfd, iocc, inbuf, cbif, outbuf, cbob, cbbr, overlapped, completionRoutine)
    16  }