diff --git a/npipe_windows.go b/npipe_windows.go index 48287e6..297aa6d 100755 --- a/npipe_windows.go +++ b/npipe_windows.go @@ -368,6 +368,11 @@ func (l *PipeListener) Close() error { // Addr returns the listener's network address, a PipeAddr. func (l *PipeListener) Addr() net.Addr { return l.addr } +// PipeHandle returns the underlying pipe handle, a syscall.Handle. +func (l *PipeListener) PipeHandle() syscall.Handle { + return l.handle +} + // PipeConn is the implementation of the net.Conn interface for named pipe connections. type PipeConn struct { handle syscall.Handle @@ -451,6 +456,11 @@ func (c *PipeConn) LocalAddr() net.Addr { return c.addr } +// PipeHandle returns the underlying pipe handle, a syscall.Handle. +func (c *PipeConn) PipeHandle() syscall.Handle { + return c.handle +} + // RemoteAddr returns the remote network address. func (c *PipeConn) RemoteAddr() net.Addr { // not sure what to do here, we don't have remote addr....