mirror of
https://github.com/linka-cloud/grpc.git
synced 2026-01-25 11:05:05 +00:00
feat(server/client): add windows pipe, pipe peer credentials support
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
18
client/dialer_windows.go
Normal file
18
client/dialer_windows.go
Normal file
@@ -0,0 +1,18 @@
|
||||
//go:build windows
|
||||
|
||||
package client
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
|
||||
"github.com/Microsoft/go-winio"
|
||||
)
|
||||
|
||||
func dial(ctx context.Context, addr string) (net.Conn, error) {
|
||||
network, address := parseDialTarget(addr)
|
||||
if network == "pipe" {
|
||||
return winio.DialPipeContext(ctx, address)
|
||||
}
|
||||
return (&net.Dialer{}).DialContext(ctx, network, address)
|
||||
}
|
||||
Reference in New Issue
Block a user