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.Addr) l, err = net.ListenUnix("unix", &net.UnixAddr{Name: sh.Addr, Net: "unix"}) os.Chmod(sh.Addr, 0777) return } func (sh *ServerHandlers) Stopped() { os.Remove(sh.Addr) }