mirror of
https://github.com/rwinkhart/peercred-mini.git
synced 2026-09-02 23:27:29 -04:00
Initial Windows support
This commit is contained in:
+1
-11
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2021-2024 AUTHORS All rights reserved.
|
||||
// Copyright (c) 2021-2025 AUTHORS All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
// other side of the connection, using various OS-specific facilities.
|
||||
package peercred
|
||||
|
||||
import (
|
||||
"net"
|
||||
)
|
||||
|
||||
// Creds are the peer credentials.
|
||||
type Creds struct {
|
||||
pid int
|
||||
@@ -26,9 +22,3 @@ func (c *Creds) PID() (pid int) {
|
||||
func (c *Creds) UID() (uid string) {
|
||||
return c.uid
|
||||
}
|
||||
|
||||
// Get returns the peer credentials for c.
|
||||
func Get(c net.Conn) *Creds {
|
||||
creds, _ := getUnix(c.(*net.UnixConn))
|
||||
return creds
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user