File
Blob: util/pipe/pipe_windows.go
| 1 | //go:build windows |
| 2 | |
| 3 | package pipe |
| 4 | |
| 5 | import ( |
| 6 | "context" |
| 7 | "net" |
| 8 | |
| 9 | "github.com/Microsoft/go-winio" |
| 10 | ) |
| 11 | |
| 12 | func DialPipe(ctx context.Context, path string) (net.Conn, error) { |
| 13 | return winio.DialPipeContext(ctx, path) |
| 14 | } |
| 15 | |
| 16 | func ListenPipe(path string) (net.Listener, error) { |
| 17 | return winio.ListenPipe(path, &winio.PipeConfig{ |
| 18 | InputBufferSize: 8 * 1024, |
| 19 | OutputBufferSize: 8 * 1024, |
| 20 | }) |
| 21 | } |