21 lines
401 B
Go
21 lines
401 B
Go
|
|
//go:build windows
|
||
|
|
|
||
|
|
package transport
|
||
|
|
|
||
|
|
import (
|
||
|
|
"net"
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"github.com/Microsoft/go-winio"
|
||
|
|
)
|
||
|
|
|
||
|
|
func dialNamedPipe(addr string, timeout *time.Duration) (net.Conn, error) {
|
||
|
|
return winio.DialPipe(NormalizeNamedPipeAddr(addr), timeout)
|
||
|
|
}
|
||
|
|
|
||
|
|
func listenNamedPipe(addr string) (net.Listener, error) {
|
||
|
|
return winio.ListenPipe(NormalizeNamedPipeAddr(addr), &winio.PipeConfig{
|
||
|
|
MessageMode: false,
|
||
|
|
})
|
||
|
|
}
|