Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions npipe_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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....
Expand Down