server/ipc/ipc_unix.go
crusader 1a1a4b7ff9 ing
2017-10-27 11:16:09 +09:00

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)
}