mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-06 00:57:19 -04:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e50471a4fc |
@@ -123,6 +123,18 @@ type win32MessageBytePipe struct {
|
|||||||
|
|
||||||
type pipeAddress string
|
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 {
|
func (f *win32Pipe) LocalAddr() net.Addr {
|
||||||
return pipeAddress(f.path)
|
return pipeAddress(f.path)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user