github.com/database64128/tfo-go/v2@v2.2.0/netpoll_windows_go121.go (about)

     1  //go:build windows && !go1.23
     2  
     3  package tfo
     4  
     5  import (
     6  	"syscall"
     7  
     8  	"golang.org/x/sys/windows"
     9  )
    10  
    11  // operation contains superset of data necessary to perform all async IO.
    12  //
    13  // Copied from src/internal/poll/fd_windows.go
    14  type operation struct {
    15  	// Used by IOCP interface, it must be first field
    16  	// of the struct, as our code rely on it.
    17  	o syscall.Overlapped
    18  
    19  	// fields used by runtime.netpoll
    20  	runtimeCtx uintptr
    21  	mode       int32
    22  	errno      int32
    23  	qty        uint32
    24  
    25  	// fields used only by net package
    26  	fd     *pFD
    27  	buf    syscall.WSABuf
    28  	msg    windows.WSAMsg
    29  	sa     syscall.Sockaddr
    30  	rsa    *syscall.RawSockaddrAny
    31  	rsan   int32
    32  	handle syscall.Handle
    33  	flags  uint32
    34  	bufs   []syscall.WSABuf
    35  }