mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-11-24 05:03:16 +00:00
19 lines
340 B
Go
19 lines
340 B
Go
//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)
|
|
}
|