mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: GetsockoptInt.
R=rsc, iant CC=golang-dev https://golang.org/cl/4271060
This commit is contained in:
parent
f2483c74f6
commit
c6810e76ed
7 changed files with 33 additions and 4 deletions
|
|
@ -130,6 +130,11 @@ func socket(domain int, typ int, proto int) (fd int, errno int) {
|
|||
return
|
||||
}
|
||||
|
||||
func getsockopt(s int, level int, name int, val uintptr, vallen *_Socklen) (errno int) {
|
||||
_, errno = socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
|
||||
return
|
||||
}
|
||||
|
||||
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
|
||||
_, errno = socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue