summaryrefslogtreecommitdiffhomepage
path: root/pkg/abi/linux/sem.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-13 23:04:01 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-13 23:05:08 -0700
commitc230d12b5ce540239df06e517f3b1b72722dcc14 (patch)
tree4c191ea971d550cd9c446a502d2b8d33fe939195 /pkg/abi/linux/sem.go
parent71e6ac3e1f551cf52166bf501de114f06502b994 (diff)
Add Sniffer.Drain() draining socket receive buffer
Add Sniffer.Drain() which drains the socket's receive buffer by temporarily setting the socket to non-blocking, and receiving in a loop until EINTR, EWOULDBLOCK or EAGAIN. This method should be used when long periods of time elapses without receiving on the socket, because uninteresting packets may have piled up in the receive buffer, filling it up and causing packets critical to test operation to be dropped. PiperOrigin-RevId: 306380480
Diffstat (limited to 'pkg/abi/linux/sem.go')
0 files changed, 0 insertions, 0 deletions