...
1
2
3
4
5
6
7 package socket
8
9 import (
10 "syscall"
11 "unsafe"
12 )
13
14 func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
15 n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
16 return int(n), errnoErr(errno)
17 }
18
19 func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
20 n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
21 return int(n), errnoErr(errno)
22 }
23
View as plain text