move platformGetRTT implementation to tcp_common.go for non-Linux platforms

This commit is contained in:
2025-11-20 21:24:58 -06:00
parent 426422413c
commit ded5853026
4 changed files with 10 additions and 12 deletions

View File

@@ -2,3 +2,13 @@
// +build !linux
package interfaces
import (
"time"
)
// platformGetRTT is defined in OS-specific files
// Default implementation for non-Linux platforms
func platformGetRTT(fd uintptr) time.Duration {
return 0
}

View File

@@ -6,7 +6,6 @@ import (
"fmt"
"net"
"syscall"
"time"
"github.com/Sudo-Ivan/reticulum-go/pkg/debug"
)
@@ -58,7 +57,3 @@ func (tc *TCPClientInterface) setTimeoutsOSX() error {
return nil
}
func platformGetRTT(fd uintptr) time.Duration {
return 0
}

View File

@@ -37,7 +37,3 @@ func (tc *TCPClientInterface) setTimeoutsOSX() error {
return tc.setTimeoutsLinux()
}
func platformGetRTT(fd uintptr) time.Duration {
return 0
}

View File

@@ -39,7 +39,4 @@ func (tc *TCPClientInterface) setTimeoutsWindows() error {
return nil
}
func platformGetRTT(fd uintptr) time.Duration {
return 0
}