mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +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
d586b30c6b
commit
c6c6f6f231
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue