mirror of
https://github.com/openfaas/faasd.git
synced 2025-06-22 06:43:28 +00:00
Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220722155237-a158d28d115b to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/commits/v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
Alex Ellis
parent
aaf1811052
commit
c5c0fa05a2
57
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
57
vendor/golang.org/x/sys/unix/syscall_unix.go
generated
vendored
@ -331,6 +331,19 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// Recvmsg receives a message from a socket using the recvmsg system call. The
|
||||
// received non-control data will be written to p, and any "out of band"
|
||||
// control data will be written to oob. The flags are passed to recvmsg.
|
||||
//
|
||||
// The results are:
|
||||
// - n is the number of non-control data bytes read into p
|
||||
// - oobn is the number of control data bytes read into oob; this may be interpreted using [ParseSocketControlMessage]
|
||||
// - recvflags is flags returned by recvmsg
|
||||
// - from is the address of the sender
|
||||
//
|
||||
// If the underlying socket type is not SOCK_DGRAM, a received message
|
||||
// containing oob data and a single '\0' of non-control data is treated as if
|
||||
// the message contained only control data, i.e. n will be zero on return.
|
||||
func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
||||
var iov [1]Iovec
|
||||
if len(p) > 0 {
|
||||
@ -346,13 +359,9 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
|
||||
return
|
||||
}
|
||||
|
||||
// RecvmsgBuffers receives a message from a socket using the recvmsg
|
||||
// system call. The flags are passed to recvmsg. Any non-control data
|
||||
// read is scattered into the buffers slices. The results are:
|
||||
// - n is the number of non-control data read into bufs
|
||||
// - oobn is the number of control data read into oob; this may be interpreted using [ParseSocketControlMessage]
|
||||
// - recvflags is flags returned by recvmsg
|
||||
// - from is the address of the sender
|
||||
// RecvmsgBuffers receives a message from a socket using the recvmsg system
|
||||
// call. This function is equivalent to Recvmsg, but non-control data read is
|
||||
// scattered into the buffers slices.
|
||||
func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
@ -371,11 +380,38 @@ func RecvmsgBuffers(fd int, buffers [][]byte, oob []byte, flags int) (n, oobn in
|
||||
return
|
||||
}
|
||||
|
||||
// Sendmsg sends a message on a socket to an address using the sendmsg system
|
||||
// call. This function is equivalent to SendmsgN, but does not return the
|
||||
// number of bytes actually sent.
|
||||
func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
|
||||
_, err = SendmsgN(fd, p, oob, to, flags)
|
||||
return
|
||||
}
|
||||
|
||||
// SendmsgN sends a message on a socket to an address using the sendmsg system
|
||||
// call. p contains the non-control data to send, and oob contains the "out of
|
||||
// band" control data. The flags are passed to sendmsg. The number of
|
||||
// non-control bytes actually written to the socket is returned.
|
||||
//
|
||||
// Some socket types do not support sending control data without accompanying
|
||||
// non-control data. If p is empty, and oob contains control data, and the
|
||||
// underlying socket type is not SOCK_DGRAM, p will be treated as containing a
|
||||
// single '\0' and the return value will indicate zero bytes sent.
|
||||
//
|
||||
// The Go function Recvmsg, if called with an empty p and a non-empty oob,
|
||||
// will read and ignore this additional '\0'. If the message is received by
|
||||
// code that does not use Recvmsg, or that does not use Go at all, that code
|
||||
// will need to be written to expect and ignore the additional '\0'.
|
||||
//
|
||||
// If you need to send non-empty oob with p actually empty, and if the
|
||||
// underlying socket type supports it, you can do so via a raw system call as
|
||||
// follows:
|
||||
//
|
||||
// msg := &unix.Msghdr{
|
||||
// Control: &oob[0],
|
||||
// }
|
||||
// msg.SetControllen(len(oob))
|
||||
// n, _, errno := unix.Syscall(unix.SYS_SENDMSG, uintptr(fd), uintptr(unsafe.Pointer(msg)), flags)
|
||||
func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
var iov [1]Iovec
|
||||
if len(p) > 0 {
|
||||
@ -394,9 +430,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
|
||||
}
|
||||
|
||||
// SendmsgBuffers sends a message on a socket to an address using the sendmsg
|
||||
// system call. The flags are passed to sendmsg. Any non-control data written
|
||||
// is gathered from buffers. The function returns the number of bytes written
|
||||
// to the socket.
|
||||
// system call. This function is equivalent to SendmsgN, but the non-control
|
||||
// data is gathered from buffers.
|
||||
func SendmsgBuffers(fd int, buffers [][]byte, oob []byte, to Sockaddr, flags int) (n int, err error) {
|
||||
iov := make([]Iovec, len(buffers))
|
||||
for i := range buffers {
|
||||
@ -543,7 +578,7 @@ func Lutimes(path string, tv []Timeval) error {
|
||||
return UtimesNanoAt(AT_FDCWD, path, ts, AT_SYMLINK_NOFOLLOW)
|
||||
}
|
||||
|
||||
// emptyIovec reports whether there are no bytes in the slice of Iovec.
|
||||
// emptyIovecs reports whether there are no bytes in the slice of Iovec.
|
||||
func emptyIovecs(iov []Iovec) bool {
|
||||
for i := range iov {
|
||||
if iov[i].Len > 0 {
|
||||
|
Reference in New Issue
Block a user