Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (23 sloc) 0.616 kB
use warnings;
use strict;
use POE;
use POE::Component::Server::TCP;
use Getopt::Long;
use POE::XS::Queue::Array; # this enhancments performance
my $port = 9010;
my $concurrent = 10;
GetOptions(
'port=i' => \$port,
'concurrent=i' => \$concurrent,
);
POE::Component::Server::TCP->new(
Port => $port,
ClientInput => sub { $_[HEAP]->{client}->put( $_[ARG0] ); },
ClientFilter => [ "POE::Filter::Line", Literal => "\x0a" ],
Address => '0.0.0.0',
Concurrency => $concurrent,
);
print "$0: http://localhost:$port/\n";
print "concurrent: $concurrent\n";
POE::Kernel->run;
exit;
Jump to Line
Something went wrong with that request. Please try again.