c5843b7615
Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
16 lines
387 B
Go
16 lines
387 B
Go
// +build windows
|
|
|
|
package sys
|
|
|
|
import (
|
|
"net"
|
|
|
|
"github.com/Microsoft/go-winio"
|
|
)
|
|
|
|
// GetLocalListener returns a Listernet out of a named pipe.
|
|
// `path` must be of the form of `\\.\pipe\<pipename>`
|
|
// (see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365150)
|
|
func GetLocalListener(path string, uid, gid int) (net.Listener, error) {
|
|
return winio.ListenPipe(path, nil)
|
|
}
|