Create interface for socket info structs, fix caching bug

From PR Review https://github.com/safing/portmaster/pull/72
This commit is contained in:
Daniel
2020-07-10 14:09:53 +02:00
parent 3d0e01383f
commit 7c6c4552aa
5 changed files with 54 additions and 52 deletions

View File

@@ -14,12 +14,12 @@ func TestSockets(t *testing.T) {
}
fmt.Println("\nTCP 4 connections:")
for _, connection := range connections {
pid := FindConnectionPID(connection)
pid := GetPID(connection)
fmt.Printf("%d: %+v\n", pid, connection)
}
fmt.Println("\nTCP 4 listeners:")
for _, listener := range listeners {
pid := FindBindPID(listener)
pid := GetPID(listener)
fmt.Printf("%d: %+v\n", pid, listener)
}
@@ -29,12 +29,12 @@ func TestSockets(t *testing.T) {
}
fmt.Println("\nTCP 6 connections:")
for _, connection := range connections {
pid := FindConnectionPID(connection)
pid := GetPID(connection)
fmt.Printf("%d: %+v\n", pid, connection)
}
fmt.Println("\nTCP 6 listeners:")
for _, listener := range listeners {
pid := FindBindPID(listener)
pid := GetPID(listener)
fmt.Printf("%d: %+v\n", pid, listener)
}
@@ -44,7 +44,7 @@ func TestSockets(t *testing.T) {
}
fmt.Println("\nUDP 4 binds:")
for _, bind := range binds {
pid := FindBindPID(bind)
pid := GetPID(bind)
fmt.Printf("%d: %+v\n", pid, bind)
}
@@ -54,7 +54,7 @@ func TestSockets(t *testing.T) {
}
fmt.Println("\nUDP 6 binds:")
for _, bind := range binds {
pid := FindBindPID(bind)
pid := GetPID(bind)
fmt.Printf("%d: %+v\n", pid, bind)
}
}