Skip to content

Commit 5337804

Browse files
committed
reuse addr
1 parent 0de2efb commit 5337804

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tools/benchmarks/readline_vs_sysread_vs_recv/server-generator.pl

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
Listen => 5,
1010
LocalAddr => 'localhost',
1111
LocalPort => 1234,
12-
Proto => 'tcp'
12+
Proto => 'tcp',
13+
ReuseAddr => 1,
1314
);
1415

1516
die $! unless $sock;
@@ -19,10 +20,10 @@
1920
my $line = <$client>;
2021
chomp $line;
2122

22-
my ($cnt, $len) = split(',', $line);
23-
next unless $cnt || $len;
23+
# my ($cnt, $len) = split(',', $line);
24+
# next unless $cnt || $len;
2425

25-
for (my $i = 1; $i <= $cnt; ++$i) {
26-
print $client '.' x $len, "\n";
27-
}
26+
# for (my $i = 1; $i <= $cnt; ++$i) {
27+
# print $client '.' x $len, "\n";
28+
# }
2829
}

0 commit comments

Comments
 (0)