1 // socket_posix.go -- Socket handling for generic POSIX systems.
3 // Copyright 2013 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
9 //sys bind(fd int, sa *RawSockaddrAny, len Socklen_t) (err error)
10 //bind(fd _C_int, sa *RawSockaddrAny, len Socklen_t) _C_int
12 //sys connect(s int, addr *RawSockaddrAny, addrlen Socklen_t) (err error)
13 //connect(s _C_int, addr *RawSockaddrAny, addrlen Socklen_t) _C_int
15 //sysnb socket(domain int, typ int, proto int) (fd int, err error)
16 //socket(domain _C_int, typ _C_int, protocol _C_int) _C_int
18 //sysnb socketpair(domain int, typ int, proto int, fd *[2]_C_int) (err error)
19 //socketpair(domain _C_int, typ _C_int, protocol _C_int, fd *[2]_C_int) _C_int
21 //sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *Socklen_t) (err error)
22 //getsockopt(s _C_int, level _C_int, name _C_int, val *byte, vallen *Socklen_t) _C_int
24 //sys sendto(s int, buf []byte, flags int, to *RawSockaddrAny, tolen Socklen_t) (err error)
25 //sendto(s _C_int, buf *byte, len Size_t, flags _C_int, to *RawSockaddrAny, tolen Socklen_t) Ssize_t
27 //sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
28 //recvmsg(s _C_int, msg *Msghdr, flags _C_int) Ssize_t
30 //sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
31 //sendmsg(s _C_int, msg *Msghdr, flags _C_int) Ssize_t