diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-04-13 23:04:01 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-04-13 23:05:08 -0700 |
commit | c230d12b5ce540239df06e517f3b1b72722dcc14 (patch) | |
tree | 4c191ea971d550cd9c446a502d2b8d33fe939195 /test/root/cgroup_test.go | |
parent | 71e6ac3e1f551cf52166bf501de114f06502b994 (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 'test/root/cgroup_test.go')
0 files changed, 0 insertions, 0 deletions