Echo server: Difference between revisions
m
→{{header|Perl 6}}: send now print
(updated) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: send now print) |
||
Line 1,371:
By default it spawns 5 child processes at startup, makes sure there are always at least 2 and at most 10 spare children available for new requests, each of which will be killed after processing 1000 requests and new ones will take their place.
=={{header|Perl 6}}==
{{
<lang perl6>my $socket = IO::Socket::INET.new:
localhost => 'localhost',
Line 1,382:
while $conn.recv -> $stuff {
say "Echoing $stuff";
$conn.
}
$conn.close;
|