overflow_discovery/server/server_handlers_unix.go
crusader bb465d3628 ing
2017-11-15 15:59:43 +09:00

16 lines
260 B
Go

package server
import (
"net"
"os"
)
func (sh *ServerHandlers) Listen() (net.Listener, error) {
os.Remove(sh.addr)
l, err := net.ListenUnix("unix", &net.UnixAddr{Name: sh.addr, Net: "unix"})
if nil == err {
os.Chmod(sh.addr, 0777)
}
return l, err
}