1
0
mirror of https://github.com/golang/go synced 2024-11-22 02:54:39 -07:00

net: delete unused socket-level option helpers

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6499043
This commit is contained in:
Mikio Hara 2012-08-29 06:54:00 +09:00
parent baf426f10f
commit ddbc85ce48

View File

@ -144,22 +144,6 @@ func setDeadline(fd *netFD, t time.Time) error {
return setWriteDeadline(fd, t) return setWriteDeadline(fd, t)
} }
func setReuseAddr(fd *netFD, reuse bool) error {
if err := fd.incref(false); err != nil {
return err
}
defer fd.decref()
return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.SOL_SOCKET, syscall.SO_REUSEADDR, boolint(reuse)))
}
func setDontRoute(fd *netFD, dontroute bool) error {
if err := fd.incref(false); err != nil {
return err
}
defer fd.decref()
return os.NewSyscallError("setsockopt", syscall.SetsockoptInt(fd.sysfd, syscall.SOL_SOCKET, syscall.SO_DONTROUTE, boolint(dontroute)))
}
func setKeepAlive(fd *netFD, keepalive bool) error { func setKeepAlive(fd *netFD, keepalive bool) error {
if err := fd.incref(false); err != nil { if err := fd.incref(false); err != nil {
return err return err