...
  
  
     1  
     2  
     3  
     4  
     5  package windows
     6  
     7  import (
     8  	"sync"
     9  	"syscall"
    10  	_ "unsafe"
    11  )
    12  
    13  
    14  
    15  func WSASendtoInet4(s syscall.Handle, bufs *syscall.WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *syscall.SockaddrInet4, overlapped *syscall.Overlapped, croutine *byte) (err error)
    16  
    17  
    18  
    19  func WSASendtoInet6(s syscall.Handle, bufs *syscall.WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *syscall.SockaddrInet6, overlapped *syscall.Overlapped, croutine *byte) (err error)
    20  
    21  const (
    22  	SIO_TCP_INITIAL_RTO                    = syscall.IOC_IN | syscall.IOC_VENDOR | 17
    23  	TCP_INITIAL_RTO_UNSPECIFIED_RTT        = ^uint16(0)
    24  	TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS = ^uint8(1)
    25  )
    26  
    27  type TCP_INITIAL_RTO_PARAMETERS struct {
    28  	Rtt                   uint16
    29  	MaxSynRetransmissions uint8
    30  }
    31  
    32  var Support_TCP_INITIAL_RTO_NO_SYN_RETRANSMISSIONS = sync.OnceValue(func() bool {
    33  	var maj, min, build uint32
    34  	rtlGetNtVersionNumbers(&maj, &min, &build)
    35  	return maj >= 10 && build&0xffff >= 16299
    36  })
    37  
    38  
    39  
    40  func rtlGetNtVersionNumbers(majorVersion *uint32, minorVersion *uint32, buildNumber *uint32)
    41  
View as plain text