Echo server: Difference between revisions

Content added Content deleted
(updated)
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}}==
{{worksWorks with|rakudo|20152016-09-0903}}
<lang perl6>my $socket = IO::Socket::INET.new:
localhost => 'localhost',
Line 1,382:
while $conn.recv -> $stuff {
say "Echoing $stuff";
$conn.sendprint($stuff);
}
$conn.close;