mirror of
https://github.com/golang/go
synced 2024-11-25 07:17:56 -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:
parent
baf426f10f
commit
ddbc85ce48
@ -144,22 +144,6 @@ func setDeadline(fd *netFD, t time.Time) error {
|
||||
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 {
|
||||
if err := fd.incref(false); err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user