From 99e90c1cba57cf3aba2b83db64c30f9e96911671 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Mon, 9 Feb 2026 22:38:30 -0500 Subject: [PATCH] Apply patch --- pipe.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pipe.go b/pipe.go index 58c68e9..01cabd7 100644 --- a/pipe.go +++ b/pipe.go @@ -123,6 +123,18 @@ type win32MessageBytePipe struct { type pipeAddress string +// GetPipeHandle returns the underlying handle of a pipe. +func GetPipeHandle(f net.Conn) windows.Handle { + switch v := f.(type) { + case *win32MessageBytePipe: + return v.handle + case *win32Pipe: + return v.handle + default: + return 0 + } +} + func (f *win32Pipe) LocalAddr() net.Addr { return pipeAddress(f.path) }