Add integrationtest utility

This commit is contained in:
Daniel
2023-03-30 10:33:09 +02:00
parent 253e3f95f8
commit 7d3b45f1a9
7 changed files with 148 additions and 9 deletions

View File

@@ -1,3 +1,4 @@
//go:build !windows && !linux
// +build !windows,!linux
package state
@@ -38,6 +39,8 @@ func getUDP6Table() (binds []*socket.BindInfo, err error) {
return nil, nil
}
func checkPID(socketInfo socket.Info, connInbound bool) (pid int, inbound bool, err error) {
// CheckPID checks the if socket info already has a PID and if not, tries to find it.
// Depending on the OS, this might be a no-op.
func CheckPID(socketInfo socket.Info, connInbound bool) (pid int, inbound bool, err error) {
return socketInfo.GetPID(), connInbound, nil
}