mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
zdtm/socket-tcp-closing: fill socket buffers effectivly
Send large chunks to fill socket buffers. Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
116e56ba46
commit
9d116b6878
@ -31,10 +31,13 @@ static int port = 8880;
|
||||
|
||||
int fill_sock_buf(int fd)
|
||||
{
|
||||
char zdtm[512];
|
||||
int flags;
|
||||
int size;
|
||||
int ret;
|
||||
|
||||
memset(zdtm, 5, sizeof(zdtm));
|
||||
|
||||
flags = fcntl(fd, F_GETFL, 0);
|
||||
if (flags == -1) {
|
||||
pr_perror("Can't get flags");
|
||||
@ -47,7 +50,6 @@ int fill_sock_buf(int fd)
|
||||
|
||||
size = 0;
|
||||
while (1) {
|
||||
char zdtm[] = "zdtm test packet";
|
||||
ret = write(fd, zdtm, sizeof(zdtm));
|
||||
if (ret == -1) {
|
||||
if (errno == EAGAIN)
|
||||
|
Loading…
x
Reference in New Issue
Block a user