github.com/network-quality/goresponsiveness@v0.0.0-20240129151524-343954285090/extendedstats/other.go (about) 1 //go:build !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !darwin && !windows 2 // +build !dragonfly,!freebsd,!linux,!netbsd,!openbsd,!darwin,!windows 3 4 /* 5 * This file is part of Go Responsiveness. 6 * 7 * Go Responsiveness is free software: you can redistribute it and/or modify it under 8 * the terms of the GNU General Public License as published by the Free Software Foundation, 9 * either version 2 of the License, or (at your option) any later version. 10 * Go Responsiveness is distributed in the hope that it will be useful, but WITHOUT ANY 11 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12 * PARTICULAR PURPOSE. See the GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License along 15 * with Go Responsiveness. If not, see <https://www.gnu.org/licenses/>. 16 */ 17 18 package extendedstats 19 20 import ( 21 "fmt" 22 "net" 23 ) 24 25 type ExtendedStats struct{} 26 27 func (es *ExtendedStats) IncorporateConnectionStats(conn net.Conn) error { 28 return fmt.Errorf("IncorporateConnectionStats is not supported on this platform") 29 } 30 31 func (es *ExtendedStats) Repr() string { 32 return "" 33 } 34 35 func ExtendedStatsAvailable() bool { 36 return false 37 } 38 39 func GetTCPInfo(basicConn net.Conn) (interface{}, error) { 40 return nil, fmt.Errorf("GetTCPInfo is not supported on this platform") 41 }