17 lines
302 B
Go
17 lines
302 B
Go
|
package server
|
||
|
|
||
|
import (
|
||
|
"net"
|
||
|
|
||
|
"git.loafle.net/commons_go/server"
|
||
|
npipe "gopkg.in/natefinch/npipe.v2"
|
||
|
)
|
||
|
|
||
|
func (sh *ServerHandlers) Listen(serverCTX server.ServerContext) (net.Listener, error) {
|
||
|
ln, err := npipe.Listen(`\\.\pipe\` + sh.addr)
|
||
|
if err != nil {
|
||
|
// handle error
|
||
|
}
|
||
|
return ln, err
|
||
|
}
|