// Unless explicitly stated otherwise all files in this repository are licensed // under the Apache License Version 2.0. // This product includes software developed at Datadog (https://www.datadoghq.com/). // Copyright 2016-present Datadog, Inc. //go:build windows package api import ( "net" "github.com/Microsoft/go-winio" ) // listenPipe returns a listener on the given Windows Pipe, using the provided security // descriptor and buffer size. func listenPipe(path string, secdec string, bufferSize int) (net.Listener, error) { ln, err := winio.ListenPipe(path, &winio.PipeConfig{ SecurityDescriptor: secdec, InputBufferSize: int32(bufferSize), }) return NewMeasuredListener(ln, "pipe_connections"), err }