vendor tsgo
This commit is contained in:
19
tools/tsgo/internal/api/transport_windows.go
Normal file
19
tools/tsgo/internal/api/transport_windows.go
Normal file
@@ -0,0 +1,19 @@
|
||||
//go:build windows
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/Microsoft/go-winio"
|
||||
)
|
||||
|
||||
// newPipeListener creates a Windows named pipe listener.
|
||||
func newPipeListener(path string) (net.Listener, error) {
|
||||
return winio.ListenPipe(path, nil)
|
||||
}
|
||||
|
||||
// GeneratePipePath returns a platform-appropriate pipe path for the given name.
|
||||
func GeneratePipePath(name string) string {
|
||||
return `\\.\pipe\` + name
|
||||
}
|
||||
Reference in New Issue
Block a user