blob: 20e9f9267c044444f801a4eb1708f3f0e77e9b5c [file] [log] [blame]
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build windows
package net
import (
const (
syscall_TCP_KEEPCNT = windows.TCP_KEEPCNT
type fdType = syscall.Handle
func maybeSkipKeepAliveTest(t *testing.T) {
// TODO(panjf2000): Unlike Unix-like OS's, old Windows (prior to Windows 10, version 1709)
// doesn't provide any ways to retrieve the current TCP keep-alive settings, therefore
// we're not able to run the test suite similar to Unix-like OS's on Windows.
// Try to find another proper approach to test the keep-alive settings on old Windows.
if !windows.SupportTCPKeepAliveIdle() || !windows.SupportTCPKeepAliveInterval() || !windows.SupportTCPKeepAliveCount() {
t.Skip("skipping on windows")