21 lines
353 B
Go
21 lines
353 B
Go
package ipc
|
|
|
|
import (
|
|
"net"
|
|
"os"
|
|
)
|
|
|
|
func (sh *ServerHandlers) Listen() (l net.Listener, err error) {
|
|
//sh.path = filepath.Join(os.TempDir(), sh.Addr)
|
|
// os.Remove(sh.path)
|
|
l, err = net.ListenUnix("unix", &net.UnixAddr{Name: sh.Addr, Net: "unix"})
|
|
|
|
os.Chmod(sh.Addr, 0700)
|
|
|
|
return
|
|
}
|
|
|
|
func (sh *ServerHandlers) Stopped() {
|
|
// os.Remove(sh.path)
|
|
}
|