mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
syscall: add socketpair
R=rsc CC=golang-dev https://golang.org/cl/1319042
This commit is contained in:
parent
a0117bafa0
commit
400f7a6ba5
9 changed files with 67 additions and 0 deletions
|
|
@ -323,6 +323,11 @@ func Socket(domain, typ, proto int) (fd, errno int) {
|
|||
return
|
||||
}
|
||||
|
||||
func Socketpair(domain, typ, proto int) (fd [2]int, errno int) {
|
||||
fd, errno = socketpair(domain, typ, proto)
|
||||
return
|
||||
}
|
||||
|
||||
func SetsockoptInt(fd, level, opt int, value int) (errno int) {
|
||||
var n = int32(value)
|
||||
return setsockopt(fd, level, opt, uintptr(unsafe.Pointer(&n)), 4)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue